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 Mindset, 04-21-2026, 06:46 AM
    0 responses
    102 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by M4ndoo, 04-20-2026, 05:21 PM
    0 responses
    144 views
    0 likes
    Last Post M4ndoo
    by M4ndoo
     
    Started by M4ndoo, 04-19-2026, 05:54 PM
    0 responses
    71 views
    0 likes
    Last Post M4ndoo
    by M4ndoo
     
    Started by cmoran13, 04-16-2026, 01:02 PM
    0 responses
    125 views
    0 likes
    Last Post cmoran13  
    Started by PaulMohn, 04-10-2026, 11:11 AM
    0 responses
    79 views
    0 likes
    Last Post PaulMohn  
    Working...
    X