Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Getting fibonacci retracement levels from indicator

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

    Getting fibonacci retracement levels from indicator

    I want to implement scaling in at various fib levels via a strategy and would like the fib levels to be based on a Fib retracment drawing on the chart on which the strategy is running.

    If I draw a fibonacci retracement on a chart and give a tag, say "Fib1", can I get the retracement levels from that drawing in the strategy?

    #2
    Hello higher.high,

    Thank you for your note.

    Yes, you would use the IFibonacciRetracements: http://ninjatrader.com/support/helpG...tracements.htm

    More information is available under IDrawObject: http://ninjatrader.com/support/helpG...drawobject.htm

    Comment


      #3
      Hi,
      Further query on this.
      IFibonacciRetracements provides only the x and y of start / end points the Retracement. Is there any way to get the actual price levels of the IFibonacciRetracements instance, which may have been drawn through a custom template.

      Regards

      Vivek

      Comment


        #4
        Hello,

        Thank you for the post.

        I am unsure this would be directly possible in NT7 as the tool was not configured to expose levels in Price, you can access the data values you enter in the tools properties which are in percentages.

        Code:
        IFibonacciRetracements fib = DrawFibonacciRetracements("Test", true, 10, Close[10], 0, Close[0]);
        FibonacciRetracements ret = (FibonacciRetracements)fib;
        foreach(NinjaTrader.Gui.Chart.FibonacciLevel level in ret.Levels)
        {
            Print(level.Value);
        }
        From this point, to get a price you would need to somehow calculate it based off of the percentage level rather than having a direct price value. Unfortunately, I would not have a sample of this type of conversion as I am unsure how the NT7 tool does this internally. I could suggest looking at the code for the NT8 version as it likely shares some of the same calculations for the Level price. This was one improvement with NT8 was that this tools source code was released, also you can access the price levels very easily.

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

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by love2code2trade, Yesterday, 01:45 PM
        4 responses
        26 views
        0 likes
        Last Post love2code2trade  
        Started by funk10101, Today, 09:43 PM
        0 responses
        7 views
        0 likes
        Last Post funk10101  
        Started by pkefal, 04-11-2024, 07:39 AM
        11 responses
        37 views
        0 likes
        Last Post jeronymite  
        Started by bill2023, Yesterday, 08:51 AM
        8 responses
        44 views
        0 likes
        Last Post bill2023  
        Started by yertle, Today, 08:38 AM
        6 responses
        26 views
        0 likes
        Last Post ryjoga
        by ryjoga
         
        Working...
        X