Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Stair Step Effect on Multi Time Frame Strategy
Collapse
X
-
Thanks to both Hedge and ChrisL for your reply.
So, in conclusion, I assume the result is correct. I am using Unirenko T2O1R8 for the primary series and Range,8 for the secondary series.
Bob
-
Bob the stairstep plot is actually the true nature of the timing of changes in the higher level plot.. smoothing it future might look smoother or prettier but in reality that smoother view is a little bit dishonest if you are seeking accuracy to be visible on your faster time frame chart.
However if you really want a smoother view of the higher time frame EMA on your faster chart then inside the indi wrap the higher time frame EMA in an EMA based on the faster primary data series and "split" the ema lengths between both of the stacked EMAs so you are not creating additional lag in the now smoother EMA visible on your chart.
hedge
Leave a comment:
-
Hi BobPerez, thanks for the follow-up. The output depends on the secondary series you are using and this is expected to happen. If you are using a primary series that updates faster than the secondary series, the secondary series values will be the same while the primary bars change, so you will get flat lines.
Leave a comment:
-
Chris,
This is the code I inserted into the indicator, based on my understanding of your explanation.
The stairstep persists.Code:if (BarsInProgress == 1 && CurrentBars[1] > 0) { previous = (CurrentBar == 0 ? Input[0] : Input[0] * constant1 + constant2 * previous); //previous = Value[0]; } if (BarsInProgress == 0 && CurrentBars[0] > 1) //else if (CurrentBars[0] > 1) //Value[0] = Value[1]; Value[0] = previous;
BobPerez
Leave a comment:
-
Hi Chris,
Thank you for replying. I didn't quite understand your code example. Both "if" statements refer to the BarsInProgress == 0. Is that correct?
And, shall I use your example code from the strategy, or insert it into the EmaSecondarySerires indicator?Last edited by bobperez; 12-13-2022, 10:02 AM.
Leave a comment:
-
Hi Bob, thanks for posting. The chart plots will have a slot index for each bar that is on the chart. If you plot based on a secondary series you will get a stair stepping effect. The best way to plot data from a sercondary series is to save the data in BarsInProgress == 1 then plot the value in BarsInProgress == 1 e.g.
Code:private double savedValue; protected override void OnBarUpdate() { if (BarsInProgress == 0) { Value[0] = savedValue; } if (BarsInProgress == 0) { savedValue = SecondaryEMAValue[0]; } }
Leave a comment:
-
Stair Step Effect on Multi Time Frame Strategy
Hello,
I have the same issue with the "stairstep" effect when plotting an indicator for a secondary series on the primary series chart. I slightly modified the Example strategy and indicator that Kate designed- Please notice that the issue persists.
Do you have any idea how to fix this?
Attached FilesTags: None
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by SalmaTrader, 07-07-2026, 10:26 PM
|
0 responses
36 views
0 likes
|
Last Post
by SalmaTrader
07-07-2026, 10:26 PM
|
||
|
Started by CarlTrading, 07-05-2026, 01:16 PM
|
0 responses
20 views
0 likes
|
Last Post
by CarlTrading
07-05-2026, 01:16 PM
|
||
|
Started by CaptainJack, 06-17-2026, 10:32 AM
|
0 responses
14 views
0 likes
|
Last Post
by CaptainJack
06-17-2026, 10:32 AM
|
||
|
Started by kinfxhk, 06-17-2026, 04:15 AM
|
0 responses
20 views
0 likes
|
Last Post
by kinfxhk
06-17-2026, 04:15 AM
|
||
|
Started by kinfxhk, 06-17-2026, 04:06 AM
|
0 responses
22 views
0 likes
|
Last Post
by kinfxhk
06-17-2026, 04:06 AM
|

Leave a comment: