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 Geovanny Suaza, 02-11-2026, 06:32 PM
        0 responses
        612 views
        0 likes
        Last Post Geovanny Suaza  
        Started by Geovanny Suaza, 02-11-2026, 05:51 PM
        0 responses
        355 views
        1 like
        Last Post Geovanny Suaza  
        Started by Mindset, 02-09-2026, 11:44 AM
        0 responses
        105 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Started by Geovanny Suaza, 02-02-2026, 12:30 PM
        0 responses
        561 views
        1 like
        Last Post Geovanny Suaza  
        Started by RFrosty, 01-28-2026, 06:49 PM
        0 responses
        564 views
        1 like
        Last Post RFrosty
        by RFrosty
         
        Working...
        X