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

Trailing stop only working on sim accounts not live

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

    Trailing stop only working on sim accounts not live

    I had an automated strategy built, and it works well with all of my sim accounts and has a custom ATM feature (ie: after 40 ticks in profit lock in 10 ticks of profit) it creates a trailing stop. it works great on all of my sim accounts. but when i put it on my live account the atm feature doesn't work i've attached some videos to show what i'm speaking about.
    Recording #101 and UB algo videos are examples of sim accounts with the atms working fine. "Same settings" at (9 mins :20 seconds) NQ hits 10 points (40 ticks) and should have locked in 10 ticks but as you can see the stop didnt move up/trail.

    I will say that i am with apex trader funding so i have to have rithmic trader pro and ninja open at the same time.
    here is the ninjascript output and the log trace files for the situation
    Last edited by joshuaburnett91; 08-14-2022, 09:17 AM.

    #2
    https://drive.google.com/file/d/1Mri...ew?usp=sharing (recording 101)

    https://drive.google.com/file/d/1GPX...ew?usp=sharing (Same settings)

    https://drive.google.com/file/d/1BXL...ew?usp=sharing (UB sim)

    Comment


      #3
      https://drive.google.com/file/d/1yE0...ew?usp=sharing (trace)

      https://drive.google.com/file/d/1TXx...ew?usp=sharing (log)

      Comment


        #4
        https://docs.google.com/document/d/1...it?usp=sharing (Ninjascript)

        Comment


          #5
          Hello joshuaburnett91,

          To confirm, you are using your own logic to modify the order prices similar to the example linked below?
          https://ninjatrader.com/support/foru...269#post802269

          Does the example from the link above that matches your approach also not modify the orders?

          Can you add prints to your script that print the time of the bar and all values used in the condition that modifies the order price with labels to show what is being compared in the condition and how it is being compared? Also, please remove all prints that are not for this specific condition.
          https://ninjatrader.com/support/foru...121#post791121
          Chelsea B.NinjaTrader Customer Service

          Comment


            #6
            I am experiencing the same problem. I call SetTrailStop() in OnStateChanged() when the state is DataLoaded. This is working very intermittently on both sim accounts and the real thing. Sometimes the stop will trail properly, sometimes it never moves.

            I also get frequent errors when Calculate is set to OnEachTick. It appears that NT may resubmit the same price change on the stop order and the exchange rejects it as already being set. I changed to OnPriceChange as this is sufficient for the trailing stop.

            Comment


              #7
              Hello aworldnervelink,

              This specific behavior of using SetTrailStop() with Calculate.OnEachTick causing the stop to be re-submitted at the same price has been reported.

              The report ID for this is NTEIGHT-15261. Unfortunately, this has not been resolved at this time.

              In the meantime, we advise to use Calculate.OnPriceChange. If the script collects volume and must use Calculate.OnEachTick, we advise to use exit orders instead of set methods.
              Chelsea B.NinjaTrader Customer Service

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by Zinger357, Today, 11:50 AM
              3 responses
              19 views
              0 likes
              Last Post Zinger357  
              Started by dylansmoo, Today, 07:04 PM
              0 responses
              3 views
              0 likes
              Last Post dylansmoo  
              Started by WalterSkinner, 02-07-2022, 09:22 AM
              6 responses
              78 views
              0 likes
              Last Post Lance El Camino  
              Started by shorty, Today, 06:20 PM
              1 response
              19 views
              0 likes
              Last Post Tasker-182  
              Started by dweems, Yesterday, 02:11 PM
              1 response
              46 views
              0 likes
              Last Post NinjaTrader_Angelica  
              Working...
              X