Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Stochastic Entry

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

    Stochastic Entry

    I am trying to get enter a trade when the ema crosses the median but only if the stochastic is above 80, rather than an exact crossover. Can someone help me adjust this code.

    // Condition set 1
    if (CrossBelow(HawkmatixMovingAverage(21), HawkmatixMovingMedian(25), 1))
    if ((CrossBelow(Stochastics(Closes[0],1, 14, 4).K, Stochastics(Closes[0],2, 14, 4).D, 1)))

    #2
    mccallum28, you can check then for the K or D value to be greater than your treshhold value -

    if (your ema cross condition && Stochastics(Closes[0],1, 14, 4).K[0] > 80.0)

    Comment


      #3
      if(
      EMA(P)[1] < HawkmatixMovingMedian(P)[1] &&
      EMA(P)[0] > HawkmatixMovingMedian(P)[0] &&
      Stochastics(Closes[0],2, 14, 4).D[0] > 80 )
      EnterLong();
      fx.practic
      NinjaTrader Ecosystem Vendor - fx.practic

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by CaptainJack, 05-29-2026, 05:09 AM
      0 responses
      475 views
      0 likes
      Last Post CaptainJack  
      Started by CaptainJack, 05-29-2026, 12:02 AM
      0 responses
      315 views
      0 likes
      Last Post CaptainJack  
      Started by charlesugo_1, 05-26-2026, 05:03 PM
      0 responses
      253 views
      1 like
      Last Post charlesugo_1  
      Started by DannyP96, 05-18-2026, 02:38 PM
      1 response
      340 views
      0 likes
      Last Post NinjaTrader_ChelseaB  
      Started by CarlTrading, 05-11-2026, 05:56 AM
      0 responses
      305 views
      0 likes
      Last Post CarlTrading  
      Working...
      X