Buy(Place)

Buy procedure add a buy signal at the selected Place. Buy is only used in System Tester

 

This procedure has one parameter:
Place   The day where the buy signal must be set

 

Example:

' This is a system
Sub Main()
  For CurrentBar = BeginBar + 1 to EndBar
    I = GetValue("Fredic", CurrentBar)
    I2 = GetValue("Fredic", CurrentBar - 1)
    If (I > 0) and (I2 < 0) then Buy(CurrentBar)
    If (I < 0) and (I2 > 0) then Sell(CurrentBar)
  Next
End Sub