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 CarlTrading, 03-31-2026, 09:41 PM
      1 response
      152 views
      1 like
      Last Post NinjaTrader_ChelseaB  
      Started by CarlTrading, 04-01-2026, 02:41 AM
      0 responses
      89 views
      1 like
      Last Post CarlTrading  
      Started by CaptainJack, 03-31-2026, 11:44 PM
      0 responses
      131 views
      2 likes
      Last Post CaptainJack  
      Started by CarlTrading, 03-30-2026, 11:51 AM
      0 responses
      127 views
      1 like
      Last Post CarlTrading  
      Started by CarlTrading, 03-30-2026, 11:48 AM
      0 responses
      107 views
      0 likes
      Last Post CarlTrading  
      Working...
      X