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

Divergence of peaks between Awesome Oscillator and price

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

    Divergence of peaks between Awesome Oscillator and price

    Good afternoon, I am trying to figure out how to identify regular divergence between price and the Awesome Oscillator (any oscillator really, but prefer the AO) in twin peaks formations. For short entries, Price needs to make a higher high on peak formations, while the AO makes a lower high. How would I create this logic in the strategy builder? I am not good with code. Attached is a quick example for a short entry as well as an example of a long entry. As you can see, price created a higher high, and both the RSI and the Awesome Oscillator created a lower high. Opposite for long entries. Entry would be on the AO color change. Any help would be appreciated! Thanks in advance.
    Attached Files

    #2
    Hi Superlite, thanks for your question.

    Unfortunately, I am unable to develop any custom code. To gain more knowledge on what the strategy builder can access/do, try using the Print statement and simply print out the values of AO. I attached a strategy as an example. Printing data from what the strategy is reading can help to understand what one can and can not do with the builder.

    Kind regards,

    -ChrisL
    Attached Files
    Chris L.NinjaTrader Customer Service

    Comment


      #3
      Thank you for the reply, and sorry for the late one myself! I'm not trying to get you to write a custom code, i just need help figuring out what to choose in the strategy builder for the divergence logic between peaks. Also, I have a question for the Awesome Oscillator. How would I capture "on bar close" of the first color changed bar on the histogram for confirm my short or long entry as per the picture above? My arrow is pointing to the first histogram bar of a different color. That is my entry point. After that first histogram bar of a different color, as long as there was regular divergence between the peaks of both the Awesome Oscillator and price, I need to enter. How do I capture that in the strategy builder? Thanks.

      Comment


        #4
        Hi, Superlite thanks for your reply.

        For what to pick to find a higher high/higher low, you can use the MAX and MIN methods. Pass in the indicators to these methods and you can find max's and min's over a number of bars. I attached a sample that will detect the Awesome Oscillators downtrend as well, this is another method of finding peaks and valleys.

        Please let me know if I can assist any further.
        Attached Files
        Chris L.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by usazencort, Today, 01:16 AM
        0 responses
        1 view
        0 likes
        Last Post usazencort  
        Started by kaywai, 09-01-2023, 08:44 PM
        5 responses
        603 views
        0 likes
        Last Post NinjaTrader_Jason  
        Started by xiinteractive, 04-09-2024, 08:08 AM
        6 responses
        22 views
        0 likes
        Last Post xiinteractive  
        Started by Pattontje, Yesterday, 02:10 PM
        2 responses
        21 views
        0 likes
        Last Post Pattontje  
        Started by flybuzz, 04-21-2024, 04:07 PM
        17 responses
        230 views
        0 likes
        Last Post TradingLoss  
        Working...
        X