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 SalmaTrader, 07-07-2026, 10:26 PM
|
0 responses
49 views
0 likes
|
Last Post
by SalmaTrader
07-07-2026, 10:26 PM
|
||
|
Started by CarlTrading, 07-05-2026, 01:16 PM
|
0 responses
22 views
0 likes
|
Last Post
by CarlTrading
07-05-2026, 01:16 PM
|
||
|
Started by CaptainJack, 06-17-2026, 10:32 AM
|
0 responses
15 views
0 likes
|
Last Post
by CaptainJack
06-17-2026, 10:32 AM
|
||
|
Started by kinfxhk, 06-17-2026, 04:15 AM
|
0 responses
21 views
0 likes
|
Last Post
by kinfxhk
06-17-2026, 04:15 AM
|
||
|
Started by kinfxhk, 06-17-2026, 04:06 AM
|
0 responses
23 views
0 likes
|
Last Post
by kinfxhk
06-17-2026, 04:06 AM
|

Comment