Has anyone tried something like this before that might be willing to point me in the right direction.
Thanks for the help.
GuppyDRV
Code: Select all
vars:
checklivedata (0),
MyCount (0),
BackTestTrade (False);
checklivedata = GetAppInfo(aiRealTimeCalc);
//Exit Trades Back Test Only
If checklivedata = 0 and Symbol_CurrentBar = 100 then begin
For MyCount = 99 downto 0 begin
BackTestTrade = True;
end;
If BackTestTrade = True then begin
Sell("ExitL") Next Bar at market;
buytocover("ExitS") Next Bar at market;
MyCount = 99;
BackTestTrade = False;
end;