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:
if date <> date then begin
nbrtradestoday = 0;
if MarketPosition <> 0 and MarketPosition = 0 then nbrtradestoday += 1;
if nbrtradestoday >= 1 then #return;
Thanks in advance!
Limit number of trades per day (Algo) [SOLVED]
Questions about MultiCharts and user contributed studies.
3 posts • Page 1 of 1
- Posts: 401
- Joined: 19 Jan 2011
- Location: Netherlands
- Has thanked: 85 times
- Been thanked: 123 times
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