Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Multi time frame and ADX /DM/ on NT7 ?bug?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Multi time frame and ADX /DM/ on NT7 ?bug?

    Please advise if this is an expected behavior on DM or any other indicator in fact.
    My understanding multi time frame on 6.5 indicators was not supported however shall be supported on NT 7.
    My NT version is the latest, just downloaded 7.0.0.12 this morning prior to creating the screenshots.
    Please note I have very little exposure to 6.5 and did a little bit of a research on multi time frame on the forum.

    First step I have used the out of box NT DM indicator and created a AAADM indicator just copying over the code. The first screenshot proves that the 2 indicator at beginning are the same.

    Second step I have added only one line in the "Initialize()" method and the indicators are different as you can see on the 2nd screen shot.

    The only difference is the inserted 2nd time frame in the code:

    Add(PeriodType.Minute, 15);

    The method below from AAADM the indicator:

    protected override void Initialize()
    {
    Add(new Plot(new Pen(Color.DarkGreen, 3), "ADX"));
    Add(new Plot(Color.Blue, "+DI"));
    Add(new Plot(Color.Red, "-DI"));

    Add(new Line(Color.DarkViolet, 25, "Lower"));
    Add(new Line(Color.YellowGreen, 75, "Upper"));

    dmPlus = new DataSeries(this);
    dmMinus = new DataSeries(this);
    sumDmPlus = new DataSeries(this);
    sumDmMinus = new DataSeries(this);
    sumTr = new DataSeries(this);
    tr = new DataSeries(this);

    Add(PeriodType.Minute, 15);

    }

    I've attached 2 screenshot.

    Thanks,

    atata
    Attached Files

    #2
    You will not be able to just add a second series and have the results without adjusting your code to accommodate the new series. When you add a second bars object you now process two different bars. If you want the same results you need to filter the OnBarUpdate() to only process on the primary bars.



    Please see the if (BarsInProgress == 0) filter type information.
    Josh P.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by PhillT, 04-19-2024, 02:16 PM
    4 responses
    31 views
    0 likes
    Last Post PhillT
    by PhillT
     
    Started by ageeholdings, 05-01-2024, 05:22 AM
    5 responses
    36 views
    0 likes
    Last Post ageeholdings  
    Started by reynoldsn, Today, 02:34 PM
    0 responses
    8 views
    0 likes
    Last Post reynoldsn  
    Started by nightstalker, Today, 02:05 PM
    0 responses
    15 views
    0 likes
    Last Post nightstalker  
    Started by llanqui, Yesterday, 09:59 AM
    8 responses
    30 views
    0 likes
    Last Post llanqui
    by llanqui
     
    Working...
    X