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 CarlTrading, 03-31-2026, 09:41 PM
|
1 response
67 views
0 likes
|
Last Post
|
||
|
Started by CarlTrading, 04-01-2026, 02:41 AM
|
0 responses
36 views
0 likes
|
Last Post
by CarlTrading
04-01-2026, 02:41 AM
|
||
|
Started by CaptainJack, 03-31-2026, 11:44 PM
|
0 responses
60 views
1 like
|
Last Post
by CaptainJack
03-31-2026, 11:44 PM
|
||
|
Started by CarlTrading, 03-30-2026, 11:51 AM
|
0 responses
62 views
0 likes
|
Last Post
by CarlTrading
03-30-2026, 11:51 AM
|
||
|
Started by CarlTrading, 03-30-2026, 11:48 AM
|
0 responses
53 views
0 likes
|
Last Post
by CarlTrading
03-30-2026, 11:48 AM
|

Comment