Hi,
How can I limit to number of trades for signal in autotrading.
For instance I just want it to take 10 trades.
I found this code but can not make it work:
vars:
nbrtradestoday (0);
if date <> date[1] then begin
nbrtradestoday = 0;
end;
if MarketPosition <> 0 and MarketPosition[1] = 0 then nbrtradestoday += 1;
if nbrtradestoday >= 1 then #return;
Thanks in advance!
BR Stefan
Limit number of trades per day (Algo) [SOLVED]
-
- Posts: 401
- Joined: 19 Jan 2011
- Location: Netherlands
- Has thanked: 85 times
- Been thanked: 123 times
Re: Limit number of trades per day (Algo) [SOLVED]
Try this:
Code: Select all
Inputs: max_trades(2); // for example max of 2 trades a day
If (EntriesToday(date) < max_trades) then begin
your entry code
end;
Re: Limit number of trades per day (Algo)
This will work as well;
Code: Select all
input: MaxTrades(1);
If tradestoday(d)<MaxTrades then begin
// your code here
End;