I'm trying to backtest a system right now and I want to limit my trades per day to a certain number. Does anyone know how I can do that?
I have been trying:
Inputs: MaxTrade(2);
Var: TradeCount(0);
If marketposition <> 0 then TradeCount = TradeCount + 1;
If time = 1300 then TradeCount = 0: {to reset to zero everyday}
{Before my entry instructions}
If marketposition = 0 and
TradeCount < MaxTrades then begin
It doesn't seem to be working. Depending on where I put the first "if" statement in my code it either does only one trade per day always or does too many trades per day.
Can anyone offer some help?
Also, does anyone know how to program to trail and stop out below the last low?
Thanks
I have been trying:
Inputs: MaxTrade(2);
Var: TradeCount(0);
If marketposition <> 0 then TradeCount = TradeCount + 1;
If time = 1300 then TradeCount = 0: {to reset to zero everyday}
{Before my entry instructions}
If marketposition = 0 and
TradeCount < MaxTrades then begin
It doesn't seem to be working. Depending on where I put the first "if" statement in my code it either does only one trade per day always or does too many trades per day.
Can anyone offer some help?
Also, does anyone know how to program to trail and stop out below the last low?
Thanks