SetTradingAccount(Amount)

SetTradingAccount is a procedure that has the same effect than change it in the System Tester's Options.

 

This procedure has one parameter:
Amount   The size of your trading account for a stock.

 

Example:

' This is a system.
Sub Main()
  SetTradingAccount(50000)
  SetMarginAccount(50000)
  For CurrentBar = BeginBar to EndBar
    I = GetValue("RSI", CurrentBar)
    I1 = GetValue("RSI", CurrentBar - 1)
    If (I < 15) and (I <> 0) and (I1 >= 15) then
      Buy(CurrentBar)
      Cover(CurrentBar + 1)
    End If
    If (I > 75) and (I1 <= 75) then
      Sell(CurrentBar)
      Short(CurrentBar + 1)
    End If
  Next
End Sub