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

Fractal Indicator

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

    Fractal Indicator

    Hi All,

    I am new to ninjatrader and i need a fractal indicator. I tried programming but i am unable to create a proper one. can someone try this?

    Here is a document on fractal and a sample code.

    1)Whatis fractal?
    Fractal The Fractal indicator is available in the “Opening point of the position” and “Closing point of the position” slots of Forex Strategy Builder. Its source code is published in Fractal Source Code Internet page. If you have any questions concerning the


    2) Sample Code
    Fractals (Page 1) — Technical Indicators — Forex Software — Create and Test Forex Strategies


    Regards
    Sujay

    #2
    Interesting.

    Can your post what you tried?

    It would be easier for me to fix your code, rather than code it from scratch.

    thanks.


    Originally posted by ssijbabu View Post
    Hi All,

    I am new to ninjatrader and i need a fractal indicator. I tried programming but i am unable to create a proper one. can someone try this?

    Here is a document on fractal and a sample code.

    1)Whatis fractal?
    Fractal The Fractal indicator is available in the “Opening point of the position” and “Closing point of the position” slots of Forex Strategy Builder. Its source code is published in Fractal Source Code Internet page. If you have any questions concerning the


    2) Sample Code
    Fractals (Page 1) — Technical Indicators — Forex Software — Create and Test Forex Strategies


    Regards
    Sujay

    Comment


      #3
      Welcome to our forums here Sujay, did you look already into the Fractals indicators offered in our sharing section on these forums?

      BertrandNinjaTrader Customer Service

      Comment


        #4
        Originally posted by NinjaTrader_Bertrand View Post
        Welcome to our forums here Sujay, did you look already into the Fractals indicators offered in our sharing section on these forums?

        http://www.ninjatrader.com/support/f...fractal&desc=1

        Hi NinjaTrader_Bertrand,

        I checked the code of bwFractals? is it identifying all the 7 patterns?

        Comment


          #5
          Sorry would not be too familiar with both scripts you compare - however the fractal shared on our forums appears to be looking for the regular pivot pattern and up to 4 matching highs / lows to identify the fractal, I believe this comes very close to what you look for. Best would be comparing outcomes generated on your instruments / timeframes of interest.
          BertrandNinjaTrader Customer Service

          Comment


            #6
            Originally posted by sledge View Post
            Interesting.

            Can your post what you tried?

            It would be easier for me to fix your code, rather than code it from scratch.

            thanks.
            Hi sledge,

            Here is the code i tried. Only the upper Fractal line is coaded.

            Regards,
            Sujay
            Attached Files

            Comment


              #7
              Originally posted by ssijbabu View Post
              Hi sledge,

              Here is the code i tried. Only the upper Fractal line is coaded.

              Regards,
              Sujay
              The first thing that you need to do would be to correct your indexing. NT indexes in the manner exactly opposite to what you have done: the index for the bar 4 bars into the past is 4, NOT -4. etc.,

              Once that is corrected, your code actually looks correct, but we can always do a review at that time, if you are still having issues.

              Comment


                #8
                Hi All,
                I finally completed the indicator. Thanks to all for you help.

                Now i need to build a strategy using this.

                Strategy 1:

                Enter:
                Enter long when the price cross upper line or short when the price cross lower line.

                Exit:
                At the end of the day (close price of the day).

                Strategy 2:

                Enter:
                Enter long when the price cross upper line or short when the price cross lower line.

                Exit: (Fixed Stop Loss or Take Profit)
                When the price hits stop loss or take profit exit it.

                Regards,
                Sujay
                Attached Files

                Comment


                  #9
                  Originally posted by ssijbabu View Post
                  Hi All,
                  I finally completed the indicator. Thanks to all for you help.

                  Now i need to build a strategy using this.

                  Strategy 1:

                  Enter:
                  Enter long when the price cross upper line or short when the price cross lower line.

                  Exit:
                  At the end of the day (close price of the day).

                  Strategy 2:

                  Enter:
                  Enter long when the price cross upper line or short when the price cross lower line.

                  Exit: (Fixed Stop Loss or Take Profit)
                  When the price hits stop loss or take profit exit it.

                  Regards,
                  Sujay
                  Nicely written, but you can make processing more efficient, if you exit after any one fractal pattern is met, instead of testing every pattern on every tick. Yikes .

                  IOW, use if ... else instead of if ... if.

                  This is especially true because you have already coded your pattern from the simplest to the most complex. You might as well exit as soon as you get the simplest pattern-match.
                  Last edited by koganam; 10-05-2012, 12:30 PM.

                  Comment


                    #10
                    Originally posted by koganam View Post
                    Nicely written, but you can make processing more efficient, if you exit after any one fractal pattern is met, instead of testing every pattern on every tick. Yikes .

                    IOW, use if ... else instead of if ... if.

                    This is especially true because you have already coded your pattern from the simplest to the most complex. You might as well exit as soon as you get the simplest pattern-match.

                    Its Done. Here is the updated one.
                    Attached Files

                    Comment


                      #11
                      Hi is their an Fractal indicator for NinjaTrader 8? I tried this version but this seems not compatible for NT8.

                      Comment


                        #12
                        One variant of this study was ported to NinjaTrader 8 and could be found in our sharing under this link - http://ninjatrader.com/support/forum...d=7&linkid=713
                        BertrandNinjaTrader Customer Service

                        Comment

                        Latest Posts

                        Collapse

                        Topics Statistics Last Post
                        Started by fiddich, Today, 05:25 PM
                        0 responses
                        3 views
                        0 likes
                        Last Post fiddich
                        by fiddich
                         
                        Started by gemify, 11-11-2022, 11:52 AM
                        6 responses
                        803 views
                        2 likes
                        Last Post ultls
                        by ultls
                         
                        Started by ScottWalsh, Today, 04:52 PM
                        0 responses
                        4 views
                        0 likes
                        Last Post ScottWalsh  
                        Started by ScottWalsh, Today, 04:29 PM
                        0 responses
                        7 views
                        0 likes
                        Last Post ScottWalsh  
                        Started by rtwave, 04-12-2024, 09:30 AM
                        2 responses
                        22 views
                        0 likes
                        Last Post rtwave
                        by rtwave
                         
                        Working...
                        X