CanID[CanNumber] = "Current Day";
Fast[CanNumber]= 6;
Slow[CanNumber]= 13;
Smooth[CanNumber] = 9;
numStdDev[CanNumber] = 2;
period[CanNumber] = 14;
TOI = Time[0];
barsAgo=GetBar(new DateTime(TOI.Year,TOI.Month,TOI.Day,00,00,00));
SubjBar = HighestBar(High,barsAgo);
Canhigh[CanNumber] = High[SubjBar];
SubjBar = LowestBar(Low,barsAgo);
Canlow[CanNumber] = Low[SubjBar];
Canopen[CanNumber] = Open[barsAgo];
Canclose[CanNumber] = Close[0];
Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Erroneous open...
Collapse
X
-
Erroneous open...
I have the following script in OnBarUpdate:
Occasionally the open price will be outside of the high and low, as if it were "clinging" to the open from the previous session. I am lost! Please help!Code:Tags: None
-
Sleeping Troll, I'm not sure what exactly your code is doing. Can you please further explain what is going on and why you think the open is wrong? This little bit of code doesn't fully explain what you're trying to do. Is your variable 'Canopen' the one obtaining a "wrong" value? If so, what value of barsAgo is being evaluated?AustinNinjaTrader Customer Service
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by Geovanny Suaza, 02-11-2026, 06:32 PM
|
0 responses
571 views
0 likes
|
Last Post
|
||
|
Started by Geovanny Suaza, 02-11-2026, 05:51 PM
|
0 responses
330 views
1 like
|
Last Post
|
||
|
Started by Mindset, 02-09-2026, 11:44 AM
|
0 responses
101 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
548 views
1 like
|
Last Post
|
||
|
Started by RFrosty, 01-28-2026, 06:49 PM
|
0 responses
549 views
1 like
|
Last Post
by RFrosty
01-28-2026, 06:49 PM
|

Comment