Hello,
I am trying to limit a program to a certain number of executions per session.
I can limit the trade number successfully. So if it opens a trade and closes a trade and goes flat it counts as 1 trade and stops trading at a specified number.
However if a trade opens then reverses and continues to buy and sell without going flat, Multicharts still sees this as 1 trade. and will allow the program to run a huge number of executions. So the trade count works when the system goes flat between trades.
Thank You for your help.
Limit number of trade executions. [SOLVED]
- JoshM
- Posts: 2195
- Joined: 20 May 2011
- Location: The Netherlands
- Has thanked: 1544 times
- Been thanked: 1565 times
- Contact:
Re: Limit number of trade executions.
The value that the `TotalTrades` variable returns should increase even if the strategy switches from a long to a short position (or vice versa). Perhaps you can try monitoring that variable?
There's also the `MaxPositionsAgo` variable if you want to know how many positions the strategy traded, if that's useful to you.
There's also the `MaxPositionsAgo` variable if you want to know how many positions the strategy traded, if that's useful to you.