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

I Keep getting this error message when I try to backtest my strategy on Playback

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

    I Keep getting this error message when I try to backtest my strategy on Playback

    The positions still stays but stop and profit disappear whenever this message occurs. I’m pretty sure there’s some kind of conflict. But i’m not sure how, where, or what to fix lol

    #2
    Hi Rafael, thanks for posting.

    This could mean you are placing invalid protective orders. Please check the Log tab of the Control Center for any errors. Please also share details on the stop and target you are setting.

    Kind regards,
    -ChrisL
    Chris L.NinjaTrader Customer Service

    Comment


      #3
      This is the second message after the first one

      Comment


        #4
        Hi Rafael, thanks for sending that.

        This means the stop-loss order you are trying to place is below the bid price at the time of submission. This order must be at or above the ask price when submitted.

        Kind regards,
        -ChrisL
        Chris L.NinjaTrader Customer Service

        Comment


          #5
          Thanks for the feedback Chris....
          Could you explain how I could change the Stop to Above or At the ask price?

          Comment


            #6
            Hi Rafael,

            There can be many ways to set a stop. To set a stop to breakeven you can set the order using the prices: Position.AveragePrice or GetCurrentAsk() to set it at the closest possible market price. I attached a pre-made strategy builder example that implements a break even as well.

            Kind regards,
            -ChrisL
            Attached Files
            Last edited by NinjaTrader_ChrisL; 08-11-2021, 03:13 PM.
            Chris L.NinjaTrader Customer Service

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by burtoninlondon, Today, 12:38 AM
            0 responses
            9 views
            0 likes
            Last Post burtoninlondon  
            Started by AaronKoRn, Yesterday, 09:49 PM
            0 responses
            14 views
            0 likes
            Last Post AaronKoRn  
            Started by carnitron, Yesterday, 08:42 PM
            0 responses
            11 views
            0 likes
            Last Post carnitron  
            Started by strategist007, Yesterday, 07:51 PM
            0 responses
            13 views
            0 likes
            Last Post strategist007  
            Started by StockTrader88, 03-06-2021, 08:58 AM
            44 responses
            3,983 views
            3 likes
            Last Post jhudas88  
            Working...
            X