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 yertle, Yesterday, 08:38 AM
    7 responses
    28 views
    0 likes
    Last Post yertle
    by yertle
     
    Started by bmartz, 03-12-2024, 06:12 AM
    2 responses
    21 views
    0 likes
    Last Post bmartz
    by bmartz
     
    Started by funk10101, Today, 12:02 AM
    0 responses
    4 views
    0 likes
    Last Post funk10101  
    Started by gravdigaz6, Yesterday, 11:40 PM
    1 response
    8 views
    0 likes
    Last Post NinjaTrader_Manfred  
    Started by MarianApalaghiei, Yesterday, 10:49 PM
    3 responses
    10 views
    0 likes
    Last Post NinjaTrader_Manfred  
    Working...
    X