Hi, I am trying to write some AFL so I can backtest various trading systems for forex.
One part of the system is to workout how much equity to use for each trade. Below is the pseudo logic I want to use but I am not sure how to reference the current 'AccountBalance'. I thought of using 'EQUITY(0)' but on reading the online help it seems this is for something else. Lots = Risk * 0.01 * AccountBalance / (ContractSize * ATR) Any help will be appreciated. Regards, Pete