if((BarsSinceEntry(1,"",0)<=3&&Highs[1][0]<=Highs[1][1]&&Highs[1][1]<=Highs[1][2])||
(BarsSinceEntry(1,"",0)>3&&Closes[1][0]<EMA(Closes[1],20)[0]))
{
ExitLong();
}
Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
How do I get exit signal from a non- primary data series in a strategy?
Collapse
X
-
How do I get exit signal from a non- primary data series in a strategy?
Hi all. I've been reading what seems like dozens of posts of multi instrument/ series strategies and indicators, and I can't find a close enough parallel to make mine work. I'm working with a strategy using 5 min bars for an entry signal, and it checks conditions of daily bars (EMA lines). I want to then have an exit signal of a close below a 50 EMA daily bar. So the primary series is the 5 min bars (entry signal) and the added series will generate the exit. But... using the condition below, the exit fires based on 5 min bars.
I'm assuming I'm using bars since entry(1,"",0) incorrectly, somehow. Any ideas? Big thanks in advance.Code:Tags: None
-
Sure. Here's the initialize:
Code:protected override void Initialize() { CalculateOnBarClose = true; ExitOnClose = false; Add(PeriodType.Day,1); }
Comment
-
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by charlesugo_1, 05-26-2026, 05:03 PM
|
0 responses
67 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
149 views
0 likes
|
Last Post
|
||
|
Started by CarlTrading, 05-11-2026, 05:56 AM
|
0 responses
162 views
0 likes
|
Last Post
by CarlTrading
05-11-2026, 05:56 AM
|
||
|
Started by CarlTrading, 05-10-2026, 08:12 PM
|
0 responses
99 views
0 likes
|
Last Post
by CarlTrading
05-10-2026, 08:12 PM
|
||
|
Started by Hwop38, 05-04-2026, 07:02 PM
|
0 responses
286 views
0 likes
|
Last Post
by Hwop38
05-04-2026, 07:02 PM
|

Comment