Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

Different ZigZags and SAR ZigZag

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

    Different ZigZags and SAR ZigZag

    Hello, anyone can help me with the ZigZag.

    I want the ZigZag have the inputs the same as MT4.

    Depth, Deviation and Backstep. (The same as MT4 ZigZag)


    and

    I have another kind of ZigZag that have SAR_step and SAR_maximum

    This is a extract of the code of this last sar zigzag.

    //---- input parameters
    extern double SAR_step=0.02;
    extern double SAR_maximum=0.2;

    int start()
    {
    //int counted_bars=IndicatorCounted();
    string txt;
    int w,PosLow,PosHigh;
    double LPic=1000000,HPic=0,price;
    datetime TimeTmp;

    //----
    ExtMapBuffer1[0]=Close[0];
    ExtMapBuffer2[0]=EMPTY_VALUE;

    for( w=0;w<BarsCount;w++){

    if( w!=0 ){ ExtMapBuffer1[w]=EMPTY_VALUE; ExtMapBuffer2[w]=EMPTY_VALUE; }

    if( iSAR(NULL,0,SAR_step,SAR_maximum,w) > Close[w] && LPic>=Low[w] ){ LPic=Low[w]; PosLow=w; }
    if( iSAR(NULL,0,SAR_step,SAR_maximum,w) < Close[w] && HPic<=High[w] ){ HPic=High[w]; PosHigh=w; }

    // H -> L
    if( iSAR(NULL,0,SAR_step,SAR_maximum,(w+1)) > Close[w+1] && iSAR(NULL,0,SAR_step,SAR_maximum,w) < Close[w] && HPic!=0)
    {
    ExtMapBuffer1[PosHigh]=HPic;
    ExtMapBuffer2[PosHigh]=HPic;
    HPic=0;
    }

    // L -> H
    if( iSAR(NULL,0,SAR_step,SAR_maximum,w) < Close[w] && iSAR(NULL,0,SAR_step,SAR_maximum,w+1) > Close[w+1] && LPic!=1000000 )
    {
    ExtMapBuffer1[PosLow]=LPic;
    ExtMapBuffer2[PosLow]=LPic;
    LPic=1000000;
    }


    }



    Thank you.

    #2
    Hello,

    Thank you for the post.

    I wanted to check, what are your questions about what you have provided?

    The Default ZigZag that comes with the platform would have different inputs than what you have said the MT4 indicator has and very likely different overall logic than the version for MT4.

    Are you asking how to create Inputs for those values or how to design the overall logic, both?

    The inputs can be generated using the indicator wizard in NinjaTrader but the logic could not be as easily generated. The logic you would need to review the MT4 indicators source code, and then try to replicate that as best you can using NinajaScript. There can be differences between platforms and how they operate so this is something you would need to compare side by side to see how each indicator works on its native platform. You could then use that knowledge to either duplicate and change the existing NT zig zag or create a new zig zag based on the logic of the MT4 indicator.

    I look forward to being of further assistance.
    JesseNinjaTrader Customer Service

    Comment


      #3
      Originally posted by NinjaTrader_Jesse View Post
      Hello,

      Thank you for the post.

      I wanted to check, what are your questions about what you have provided?

      The Default ZigZag that comes with the platform would have different inputs than what you have said the MT4 indicator has and very likely different overall logic than the version for MT4.

      Are you asking how to create Inputs for those values or how to design the overall logic, both?

      The inputs can be generated using the indicator wizard in NinjaTrader but the logic could not be as easily generated. The logic you would need to review the MT4 indicators source code, and then try to replicate that as best you can using NinajaScript. There can be differences between platforms and how they operate so this is something you would need to compare side by side to see how each indicator works on its native platform. You could then use that knowledge to either duplicate and change the existing NT zig zag or create a new zig zag based on the logic of the MT4 indicator.

      I look forward to being of further assistance.

      I want to know if anyone can help me to create that inputs to the ZigZag Indicator. I dont have any knowledge about programming. Thank you.

      Comment


        #4
        Hello,

        Thank you for clarifying.

        I will have our business development comment on this thread in regard to third-party options.

        If you are interested in learning to program for this item, I can provide help resources to you, otherwise, this thread will remain open for the community to recommend any items that may already do this.

        I look forward to being of further assistance.
        JesseNinjaTrader Customer Service

        Comment


          #5
          Hello Contrax,

          You can search our extensive library of vendors who provide programming services through the link below. Simply enter a consultant name or search by using our filter categories. Once you have identified your consultants of choice, please visit each consultant's site for more information or contact them directly to learn more!

          You can locate the contact information for the consultants on their direct websites for any additional questions you may have. Since these consultants are third party services for NinjaTrader all pricing and support information will need to be obtained through the consultant.

          This NinjaTrader Ecosystem website is for educational and informational purposes only and should not be considered a solicitation to buy or sell a futures contract or make any other type of investment decision. The companies and services listed on this website are not to be considered a recommendation and it is the reader's responsibility to evaluate any product, service, or company. NinjaTrader Ecosystem LLC is not responsible for the accuracy or content of any product, service or company linked to on this website.

          Please let me know if you have any questions, concerns or if I can provide any further assistance by responding to this thread at your convenience.
          Ryan L.NinjaTrader Customer Service

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by DJ888, 04-16-2024, 06:09 PM
          6 responses
          18 views
          0 likes
          Last Post DJ888
          by DJ888
           
          Started by Jon17, Today, 04:33 PM
          0 responses
          1 view
          0 likes
          Last Post Jon17
          by Jon17
           
          Started by Javierw.ok, Today, 04:12 PM
          0 responses
          6 views
          0 likes
          Last Post Javierw.ok  
          Started by timmbbo, Today, 08:59 AM
          2 responses
          10 views
          0 likes
          Last Post bltdavid  
          Started by alifarahani, Today, 09:40 AM
          6 responses
          41 views
          0 likes
          Last Post alifarahani  
          Working...
          X