Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

TS Super Trend / Out of Sync / Too Many Entries

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

    TS Super Trend / Out of Sync / Too Many Entries

    I made a very simple TS Super Trend strategy that reverses when there is a change from uptrend to downtrend, and has a set stop loss. It back test well but when I run it live it keeps getting out of sync and taking more positions than it is suppose to. Can anyone help me figure out what the problem is? (I am not a coder).
    Attached Files
    Last edited by NinjaTrader_Jesse; 03-16-2021, 12:42 PM. Reason: dll in file not permitted

    #2
    Hello williamsjpw3,

    Based on the description it sounds like you may be seeing one of the normal differences from historical and realtime. Are you running the script OnEachTick or OnPriceChange in realtime? If so that would not match the historical tests which use OnBarClose so that would cause differences.

    Generally to answer this type of question would require that you debug the script to see why the conditions you made are happening differently between tests. A good way to approach that is to use Print(""); statements to output what the script is doing

    Have you at this point tried to use prints to see how your logic is run in each test?

    I look forward to being of further assistance.

    Comment


      #3
      It is using on bar close. I have not tried prints. Do you have a guide for how to do that?

      Comment


        #4
        Hello williamsjpw3,

        If you are using the builder the print would be in the actions under the misc folder. You could use that to print when a condition is true to get a better idea of how frequently its happening. The output from that goes to the New -> NinjaScript output window.

        When using an indicator in your condition you may need to review what values the strategy is seeing to better understand why it is taking more/less trades than it should be. Outputting the values of the indicator by using a print is one way to do that.

        I look forward to being of further assistance.

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by NullPointStrategies, Today, 05:17 AM
        0 responses
        20 views
        0 likes
        Last Post NullPointStrategies  
        Started by argusthome, 03-08-2026, 10:06 AM
        0 responses
        119 views
        0 likes
        Last Post argusthome  
        Started by NabilKhattabi, 03-06-2026, 11:18 AM
        0 responses
        63 views
        0 likes
        Last Post NabilKhattabi  
        Started by Deep42, 03-06-2026, 12:28 AM
        0 responses
        41 views
        0 likes
        Last Post Deep42
        by Deep42
         
        Started by TheRealMorford, 03-05-2026, 06:15 PM
        0 responses
        45 views
        0 likes
        Last Post TheRealMorford  
        Working...
        X