Close(Place) as Number

Close function returns the close value of Place day.

 

This function has one parameter:
Place   Place is the day you want to retrieve the close value.

 

Example:

' This is a system
' Use Close function
Sub Main()
  For CurrentBar = BeginBar + 2 to EndBar
    If (Close(CurrentBar) < Close(CurrentBar - 1)) and (Close(CurrentBar - 1) < Close(CurrentBar - 2)) then Buy(CurrentBar)
    If (Close(CurrentBar) > Close(CurrentBar - 1)) and (Close(CurrentBar - 1) > Close(CurrentBar - 2)) then Sell(CurrentBar)
  Next
End Sub