Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

New at creating strategies

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

    New at creating strategies

    I created a sma cross over strategy, and need help with the following;

    1-How to make the fast and slow sma's different colors.

    2-How to confirm on a sell that the current candle made a higher high than the previous 10 candles

    3-How to confirm on a sell that the current bar made a lower low than the previous 10 candles

    #2
    Hi Brandon, I have some answers for you:
    1. See the sample strategy bundled with NinjaTrader called SampleMACrossOver. From Control Center -> Tools -> Edit NinjaScript -> Strategies -> SampleMACrossOver. The area you're interested in covers lines 38-42.
    2. Code:
       if (MAX(High, 10)[0] > MAX(High, 10)[1])
      This code would check if the highest high of last ten bars is greater than the previous highest high (last bar).
    3. Very similar process to #2, but you'll have to modify it to suit your purpose.
    AustinNinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by CarlTrading, 03-31-2026, 09:41 PM
    1 response
    67 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by CarlTrading, 04-01-2026, 02:41 AM
    0 responses
    36 views
    0 likes
    Last Post CarlTrading  
    Started by CaptainJack, 03-31-2026, 11:44 PM
    0 responses
    61 views
    1 like
    Last Post CaptainJack  
    Started by CarlTrading, 03-30-2026, 11:51 AM
    0 responses
    62 views
    0 likes
    Last Post CarlTrading  
    Started by CarlTrading, 03-30-2026, 11:48 AM
    0 responses
    53 views
    0 likes
    Last Post CarlTrading  
    Working...
    X