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

Exit Long orders creating Short Positions

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

    Exit Long orders creating Short Positions

    Using onbarclose I have not encounter this before. But I built a strategy to run onpricechange for my conditions for Long and Short entrires. Backtesting seems fine in the strategy analyzer executions there are NO executions for entries that come from a Exit order.

    But when testing in Playback mode 100's of entries caused by Exit Orders being sent when there is NO position to exit which results in a position in the wrong direction.


    #2
    Hello DTSSTS,

    Are you expecting OnBarUpdate() to trigger intra-bar when using Calculate set to .OnPriceChange()?

    This will only work if you have TickReplay enabled and the historical tick data available.

    Below is a link to a forum post about this.


    Do you have TickReplay enabled?
    Can you load a chart with the same amount of tick data?
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      I did not have tickReplay enabled. Does this work with PlayBack Connection as well.

      But for my purposes, Tickreplay does not function with my type bar, similar to Renko in nature. when selecting Tickreplay in Strategy Analyzer the check box will not engage

      you ask "Can you load a chart with the same amount of tick data?" but I do not exactly know what you are asking?

      Thanks

      Comment


        #4
        Hello DTSSTS,

        If the bar type does not allow for TickReplay due to IsRemoveLastBarSupported, you will not be able to have Calculate trigger historically for .OnPriceChange.

        Yes, TickReplay works with historical data, even the historical data that loads in Playback before the real-time playback starts.

        I'm asking if you can change the bar type to Tick and the Start and End dates to the same dates and see bars on the chart. TickReplay requires historical tick data.
        Chelsea B.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by frslvr, 04-11-2024, 07:26 AM
        6 responses
        105 views
        1 like
        Last Post NinjaTrader_BrandonH  
        Started by trilliantrader, 04-18-2024, 08:16 AM
        6 responses
        26 views
        0 likes
        Last Post trilliantrader  
        Started by arvidvanstaey, Yesterday, 02:19 PM
        5 responses
        14 views
        0 likes
        Last Post NinjaTrader_Zachary  
        Started by Rapine Heihei, Yesterday, 08:25 PM
        1 response
        12 views
        0 likes
        Last Post NinjaTrader_ChelseaB  
        Started by Mongo, Yesterday, 11:05 AM
        6 responses
        27 views
        0 likes
        Last Post Mongo
        by Mongo
         
        Working...
        X