Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

crossover strategy

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

    crossover strategy

    hi
    i am having a problem completing my strategy ,i am trying to do the following
    21sma cross above 55 sma long
    21 sma cross below 55 sma short
    when 5 sma crosses above 55 exit short
    when 5 sma crosses below 55 sma exit long
    stops at 2.5

    i am able to program the 21 and 55 cross to enter long and short but i am having problems with 5 and 55 exits,can you please help me out,i tried programin this on the same set of conditions and on a seperate set and they are not working ,i am only able to get the 21 and 55 cross to buy and sell where the long exits only to enter in a short sell when they cross

    thank you

    #2
    green,

    These need to be in separate sets and your explicit exits will only exit if you were previously holding a position in that direction.
    Josh P.NinjaTrader Customer Service

    Comment


      #3
      crossover strategy

      ok i do put them in seperate sets of conditions but when i back test it it does not show exiting using 5 crossing it only shows it as 21/55 cross changing from long to short position

      Comment


        #4
        green,

        Please post screenshots of all your sets you have. Thank you.
        Josh P.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by reynoldsn, 05-10-2024, 07:04 PM
        1 response
        14 views
        0 likes
        Last Post NinjaTrader_BrandonH  
        Started by franciscog21, 05-10-2024, 05:27 PM
        1 response
        30 views
        0 likes
        Last Post NinjaTrader_BrandonH  
        Started by llanqui, Today, 11:10 AM
        0 responses
        8 views
        0 likes
        Last Post llanqui
        by llanqui
         
        Started by llanqui, Today, 10:29 AM
        0 responses
        9 views
        0 likes
        Last Post llanqui
        by llanqui
         
        Started by llanqui, Today, 08:32 AM
        1 response
        16 views
        0 likes
        Last Post llanqui
        by llanqui
         
        Working...
        X