logically, using "Bars since entry/exit" makes sense, but I end up with nothing done as i don't have a first trade in place
Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
setting xx amount of time before entering the next trade
Collapse
X
-
setting xx amount of time before entering the next trade
another noobie question for you guys..... how do I go about setting my strategy to wait x number of bars after one trade, before entering into another trade...
logically, using "Bars since entry/exit" makes sense, but I end up with nothing done as i don't have a first trade in placeTags: None
-
hi Joydeep,
thanks for the reply. Unfortunately I'm still unclear as to how to set a time buffer between trades.
Suppose my code looks like this:
protected override void OnBarUpdate()
{
// Condition set 1 LONG
if (BarsSinceEntry() > 15 && CrossAbove(RSI(Close, 14, 3), 60, 10)
EnterLong(10000, "LONG1");
}
I imagine no trades are ever initiated in my backtest because there is no initial entry for the BarsSinceEntry (or Exit) to look back to. So how do I get the process started? I've tried adding an EnterLong(100) in front of Condition set 1 so as to initiate a trade to look back to, but backtest still giving me nothing
Comment
-
You want to key off BarssinceExit(), not BarsSinceEntry().Originally posted by kelvinlau2 View Posthi Joydeep,
thanks for the reply. Unfortunately I'm still unclear as to how to set a time buffer between trades.
Suppose my code looks like this:
protected override void OnBarUpdate()
{
// Condition set 1 LONG
if (BarsSinceEntry() > 15 && CrossAbove(RSI(Close, 14, 3), 60, 10)
EnterLong(10000, "LONG1");
}
I imagine no trades are ever initiated in my backtest because there is no initial entry for the BarsSinceEntry (or Exit) to look back to. So how do I get the process started? I've tried adding an EnterLong(100) in front of Condition set 1 so as to initiate a trade to look back to, but backtest still giving me nothing
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by charlesugo_1, 05-26-2026, 05:03 PM
|
0 responses
59 views
0 likes
|
Last Post
by charlesugo_1
05-26-2026, 05:03 PM
|
||
|
Started by DannyP96, 05-18-2026, 02:38 PM
|
1 response
143 views
0 likes
|
Last Post
|
||
|
Started by CarlTrading, 05-11-2026, 05:56 AM
|
0 responses
161 views
0 likes
|
Last Post
by CarlTrading
05-11-2026, 05:56 AM
|
||
|
Started by CarlTrading, 05-10-2026, 08:12 PM
|
0 responses
97 views
0 likes
|
Last Post
by CarlTrading
05-10-2026, 08:12 PM
|
||
|
Started by Hwop38, 05-04-2026, 07:02 PM
|
0 responses
283 views
0 likes
|
Last Post
by Hwop38
05-04-2026, 07:02 PM
|

Comment