PDA

View Full Version : Limiting trade number to one trader per day


hanoakihiro
04-28-2009, 07:01 AM
How can you limit the number of trade per day under certain strategy?

Without a limit, my strategy keeps entries in a day as long as the entry condition is met.

Please let me know how I can limit the number of trades per day.

NinjaTrader_Josh
04-28-2009, 07:22 AM
hanoakihiro,

Run your own counter each time your strategy trades. Once it reaches your max, don't trade anymore. At the start of a new day, reset the counter.

Untested pseudocode

if (Bars.FirstBarOfSession && FirstTickOfBar)
tradeCount = 0;

if (condition && tradeCount <= 10)
{
EnterLong();
tradeCount++;
}