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 GussJ, 03-04-2020, 03:11 PM
    16 responses
    3,280 views
    0 likes
    Last Post Leafcutter  
    Started by WHICKED, Today, 12:45 PM
    2 responses
    19 views
    0 likes
    Last Post WHICKED
    by WHICKED
     
    Started by Tim-c, Today, 02:10 PM
    1 response
    9 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by Taddypole, Today, 02:47 PM
    0 responses
    5 views
    0 likes
    Last Post Taddypole  
    Started by chbruno, 04-24-2024, 04:10 PM
    4 responses
    52 views
    0 likes
    Last Post chbruno
    by chbruno
     
    Working...
    X