Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

divergence strategy

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

    divergence strategy

    NT7:5
    Hi- I am trying to work out a way of developing a condition whereby the high of a stochastic (x) bars ago is lower than the high of a stochastic in the current bar. My second condition will be the close of price being higher than that of the (x) bars ago.. therefore giving me a picture of divergence.
    IS there a way to accomplish that in NT 7?
    I have tried nesting "swing" into the stoch- and now I'm confused.
    Thanks
    raycam

    #2
    raycam,

    This works just like how it did in 6.5. Not sure what you mean by high of a stochastics though. Stochastics has a D plot and a K plot. You would need to choose which plot you want to use and then do something like this:

    This compares the D plot's current value versus D plot's value 5 bars ago. It also requires the close price of the current bar to be greater than the close price of 5 bars ago.
    Code:
    if (Stochastics(some parameters).D[0] > Stochastics(some parameters).D[5] && Close[0] > Close[5])
    Josh P.NinjaTrader Customer Service

    Comment


      #3
      I use a stochastic "k" to watch the "wave motion" for divergence. By that I mean if the trough of a K "wave" is higher this time than the previous as well as price being lower at the same point- it can be a sign of divergence and a possible buy opportunity.
      What I am asking is how can I code in a "wave trough or peak"?
      thanks
      raycam

      Comment


        #4
        Same concept as posted earlier, but just use your K plot instead. You want to check index [0] versus [5] for your divergence. The 5 index can be any other index you want.
        Josh P.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Hwop38, 05-04-2026, 07:02 PM
        0 responses
        161 views
        0 likes
        Last Post Hwop38
        by Hwop38
         
        Started by CaptainJack, 04-24-2026, 11:07 PM
        0 responses
        308 views
        0 likes
        Last Post CaptainJack  
        Started by Mindset, 04-21-2026, 06:46 AM
        0 responses
        245 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Started by M4ndoo, 04-20-2026, 05:21 PM
        0 responses
        349 views
        0 likes
        Last Post M4ndoo
        by M4ndoo
         
        Started by M4ndoo, 04-19-2026, 05:54 PM
        0 responses
        179 views
        0 likes
        Last Post M4ndoo
        by M4ndoo
         
        Working...
        X