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 Geovanny Suaza, 02-11-2026, 06:32 PM
|
0 responses
660 views
0 likes
|
Last Post
|
||
|
Started by Geovanny Suaza, 02-11-2026, 05:51 PM
|
0 responses
375 views
1 like
|
Last Post
|
||
|
Started by Mindset, 02-09-2026, 11:44 AM
|
0 responses
110 views
0 likes
|
Last Post
by Mindset
02-09-2026, 11:44 AM
|
||
|
Started by Geovanny Suaza, 02-02-2026, 12:30 PM
|
0 responses
574 views
1 like
|
Last Post
|
||
|
Started by RFrosty, 01-28-2026, 06:49 PM
|
0 responses
579 views
1 like
|
Last Post
by RFrosty
01-28-2026, 06:49 PM
|

Comment