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

How know if the trendline is bullish or bearish?

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

    How know if the trendline is bullish or bearish?

    Hello
    In the trendline indicator that comes with ninjatrader and at Autotrendline https://ninjatraderecosystem.com/use...totrendline-2/
    Created By NinjaTrader_Paul
    with its Autotrendline indicator we can recover the signal to develop a strategy.
    what I would like to know if there is a solution to know if the trend is bullish or bearish? to use it in a strategy
    Thanks in advance

    #2
    Hello aekzof,

    Thats not specifically something that is exposed on the indicators however you could modify either indicator to expose a value. In the auto trendline it uses a ray which takes two prices, you could check if the second price is greater/lesser than the first to get an idea of the rays projection which would be up or down. Based on that you could plot a value or expose a value for the strategy.

    In the linked indicator it has the following line which would likely be a place where you could do that type of check:
    Code:
    double startBarPrice = Low[upTrendStartBarsAgo];
    double endBarPrice = Low[upTrendEndBarsAgo];
    Another alternative is to just expose a value based on which drawing object the indicator draws, it has a up trend and down trend ray with different tag names. It has two sections so that would be another area where you could expose a value based on which has been drawn.
    Last edited by NinjaTrader_Jesse; 04-19-2022, 03:22 PM.
    JesseNinjaTrader Customer Service

    Comment


      #3
      Hello
      it's very advanced for me
      I think to retrieve a value from an indicator to use it in a strategy you need a plot
      and to add a plot to this indicator you have to be like NinjaTrader_Paul
      Thank you

      Comment


        #4
        Hi
        I found a solution, it was in the strategy to detect the trend on the graph and according to the tag or coordinates we can know its state.
        on the other hand I think that there is an error the in the tag it is always displays the opposite.
        trendline included in ninjatrader

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by trilliantrader, 04-18-2024, 08:16 AM
        5 responses
        22 views
        0 likes
        Last Post trilliantrader  
        Started by Davidtowleii, Today, 12:15 AM
        0 responses
        3 views
        0 likes
        Last Post Davidtowleii  
        Started by guillembm, Yesterday, 11:25 AM
        2 responses
        9 views
        0 likes
        Last Post guillembm  
        Started by junkone, 04-21-2024, 07:17 AM
        9 responses
        70 views
        0 likes
        Last Post jeronymite  
        Started by mgco4you, Yesterday, 09:46 PM
        1 response
        14 views
        0 likes
        Last Post NinjaTrader_Manfred  
        Working...
        X