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

Using Fibonacci in an indicator

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

    Using Fibonacci in an indicator

    I'd like to create a custom indicator using the DrawFibonacciExtensions and ...Retracements methods. Is there any way I can programmatically adjust the properties of the Fibonacci object that is created? For example, the line percents, colors, widths, the Extend Right property, etc?

    Thanks!
    Bryan
    cassb
    NinjaTrader Ecosystem Vendor - Logical Forex

    #2
    Unfortunately this is not supported at this time.

    Comment


      #3
      Originally posted by NinjaTrader_Dierk View Post
      Unfortunately this is not supported at this time.
      Hm... can you send me the code that generates that object then? Otherwise, I guess I would have to create my own object, if that's even possible.

      Bryan
      cassb
      NinjaTrader Ecosystem Vendor - Logical Forex

      Comment


        #4
        There are no public methods that will return a fib object.
        RayNinjaTrader Customer Service

        Comment


          #5
          Originally posted by NinjaTrader_Ray View Post
          There are no public methods that will return a fib object.
          No, I was asking for your internal code that you have to generate the fib object so I can tweak it and generate my own. But I guess that's proprietary. Bummer. I guess I'll be writing my own.

          And what are you doing working on a Sunday night? Watch TV like the rest of us.
          cassb
          NinjaTrader Ecosystem Vendor - Logical Forex

          Comment


            #6
            TV is on in the background...We have a lot of customers with questions...The downside to a high growth business...Good problem to have.
            RayNinjaTrader Customer Service

            Comment


              #7
              Originally posted by NinjaTrader_Ray View Post
              TV is on in the background...We have a lot of customers with questions...The downside to a high growth business...Good problem to have.
              You're a good and dedicated man, Ray. I admire your work ethic and business success. I hope it's not at the expense of your family. No need to respond -- I don't mean to get too personal.

              I just hope we can both benefit from these indicators I'm writing. I'll be looking up how to compile and manage licenses for them in a while.
              cassb
              NinjaTrader Ecosystem Vendor - Logical Forex

              Comment


                #8
                Custom Fib Coding from TS

                Originally posted by cassb View Post
                No, I was asking for your internal code that you have to generate the fib object so I can tweak it and generate my own. But I guess that's proprietary. Bummer. I guess I'll be writing my own.

                Cassb:

                I am newbie to Ninja and have a few things from TS that I can't use anymore since they cancelled accounts for many Canadians last month and I am not willing to pay $250 a month for the platform.

                One set of indicators I coded includes Fibs. Now the problem for you might be that I had my own way of defining tops and bottoms using closing price along with a pivot formation that is a little more sophisticated than a simple 2-5 bar pivot. You might not want that.

                But you may find the following code helpful. It might be confusing because the first part references functions that are pasted in below, either with ++++++++ line and word FUNCTION or more simply a // preceding the line.

                If it is confusing and you think this might be helpful let me know and I'll clean it up a little.

                I also have trend formulations based on breakouts of previous significant highs and lows and drawing the Fibs off those levels versus just the swings.

                I tried to enter the code and it is too long. So here is am attachment in Word Doc. If you have TS and want the ELD I can send those. Just ask. But soon because soon I won't have TS any more and won't be able to open ELD's and might not get all of them saved before my subscription ends this month.

                I also include one with profit targets although it is not 'correct' in that it doesn't project off the latest Low-High-Low swings, simply the range of the last H-L or L-H swing. I couldn't figure out how to reference previous swings and they are so easy to draw with a drawing tool that I didn't put the time in to do so.

                Let me know if any of this is helpful.


                I have zipped the Word Docs and I think they should go through. Let me know if they don't.
                Attached Files
                Last edited by cclsys; 10-29-2008, 02:10 PM. Reason: adding zipped attachments

                Comment


                  #9
                  Originally posted by cclsys View Post
                  Cassb:

                  I am newbie to Ninja and have a few things from TS that I can't use anymore since they cancelled accounts for many Canadians last month and I am not willing to pay $250 a month for the platform.

                  One set of indicators I coded includes Fibs. Now the problem for you might be that I had my own way of defining tops and bottoms using closing price along with a pivot formation that is a little more sophisticated than a simple 2-5 bar pivot. You might not want that.

                  But you may find the following code helpful. It might be confusing because the first part references functions that are pasted in below, either with ++++++++ line and word FUNCTION or more simply a // preceding the line.

                  If it is confusing and you think this might be helpful let me know and I'll clean it up a little.

                  I also have trend formulations based on breakouts of previous significant highs and lows and drawing the Fibs off those levels versus just the swings.

                  I tried to enter the code and it is too long. So here is am attachment in Word Doc. If you have TS and want the ELD I can send those. Just ask. But soon because soon I won't have TS any more and won't be able to open ELD's and might not get all of them saved before my subscription ends this month.

                  I also include one with profit targets although it is not 'correct' in that it doesn't project off the latest Low-High-Low swings, simply the range of the last H-L or L-H swing. I couldn't figure out how to reference previous swings and they are so easy to draw with a drawing tool that I didn't put the time in to do so.

                  Let me know if any of this is helpful.

                  I posted this and cannot see the attachments. If you can't too let me know and I will try again.
                  Thanks, cclsys! I don't see any attachments, but I think I'll be OK with what I have so far. I'm actually using the Zigzag indicator code to generate my pivots, which in turn I think uses the swing functionality. Then from that, it's pretty simple to calculate the Fib levels and draw the lines at each level. I think that's all I need for now. The only hitch I'm running into is that when I use the DrawLine and DrawText to try to emulate the Fibonacci object that Ninja Trader produces with the F9 key function, the text and lines have to be anchored to a bar number, and it doesn't really look as good as the Fib object does. I assume that object is like an image object or something that scales itself as you move/adjust the chart.
                  cassb
                  NinjaTrader Ecosystem Vendor - Logical Forex

                  Comment


                    #10
                    I just added the attachments.

                    I understand about using other things instead.

                    My experience thus far with Ninja is that since I can tell I won't be able to deal with coding issues I just have to work with far more limitations and in fact that is a good thing! I have been flummoxed trying to code in a simple EMA > SMA for several days. Something that simple I could code blindfold in TS but can't even get close in Ninja so I have given up on coding although I hope I can get that ability (indicator color and bar color) in Ninja just for trading purposes. As for system development, I won't even try even though I have some good ones that were getting ready for live trading in TS just as they closed me down.

                    Comment


                      #11
                      Originally posted by cclsys View Post
                      I just added the attachments.

                      I understand about using other things instead.

                      My experience thus far with Ninja is that since I can tell I won't be able to deal with coding issues I just have to work with far more limitations and in fact that is a good thing! I have been flummoxed trying to code in a simple EMA > SMA for several days. Something that simple I could code blindfold in TS but can't even get close in Ninja so I have given up on coding although I hope I can get that ability (indicator color and bar color) in Ninja just for trading purposes. As for system development, I won't even try even though I have some good ones that were getting ready for live trading in TS just as they closed me down.

                      I've done all that stuff. You can ask me for help any time. I'd be glad to share the knowledge.

                      Bryan
                      cassb
                      NinjaTrader Ecosystem Vendor - Logical Forex

                      Comment

                      Latest Posts

                      Collapse

                      Topics Statistics Last Post
                      Started by alifarahani, Today, 09:40 AM
                      6 responses
                      38 views
                      0 likes
                      Last Post alifarahani  
                      Started by Waxavi, Today, 02:10 AM
                      1 response
                      17 views
                      0 likes
                      Last Post NinjaTrader_LuisH  
                      Started by Kaledus, Today, 01:29 PM
                      5 responses
                      14 views
                      0 likes
                      Last Post NinjaTrader_Jesse  
                      Started by Waxavi, Today, 02:00 AM
                      1 response
                      12 views
                      0 likes
                      Last Post NinjaTrader_LuisH  
                      Started by gentlebenthebear, Today, 01:30 AM
                      3 responses
                      17 views
                      0 likes
                      Last Post NinjaTrader_Jesse  
                      Working...
                      X