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 argusthome, 03-08-2026, 10:06 AM
    0 responses
    116 views
    0 likes
    Last Post argusthome  
    Started by NabilKhattabi, 03-06-2026, 11:18 AM
    0 responses
    61 views
    0 likes
    Last Post NabilKhattabi  
    Started by Deep42, 03-06-2026, 12:28 AM
    0 responses
    40 views
    0 likes
    Last Post Deep42
    by Deep42
     
    Started by TheRealMorford, 03-05-2026, 06:15 PM
    0 responses
    44 views
    0 likes
    Last Post TheRealMorford  
    Started by Mindset, 02-28-2026, 06:16 AM
    0 responses
    82 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Working...
    X