Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Reverse your bot

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

    Reverse your bot

    Hi
    this might be a stupid question but I can't figure it out. So I mad a bot that constantly losing money like 20k per month on NQ. I figurI'd that if I flip my code to enter long instead of short and short for long. Exit also flip this should make so much money right? Nope it still lose money.

    I check entry and exit and it does enter and exit same spot. It might have like 2 to 3 ticks different.

    Any idea why flipping bad bot won't work?
    Thanks

    #2
    Hello SuperDude123,

    I would analyze the trades. My guess is that the entry and exit price and times are not exactly the same.

    Below is a link to a forum post that demonstrates how to write information to file for analysis.
    Citizens of the NinjaTrader Community, A common question we hear from clients is 'why are results from backtest different from real-time or from market replay?'. Live orders are filled on an exchange with a trading partner on an agreed upon price based on market dynamics. Backtest orders are not using these market dynamics.


    Output the time of the bar and all values used in conditions that submit orders. Output the order object in OnOrderUpdate(). Output the TraceOrders information from OnOrderTrace(). Output the SystemPerformance.AllTrades[SystemPerformance.AllTrades.Count - 1].ProfitCurrency each time the position is closed.

    Provide the output from each test and I would be happy to assist with the analysis of each trade.
    Chelsea B.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by CarlTrading, 03-31-2026, 09:41 PM
    1 response
    41 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by CarlTrading, 04-01-2026, 02:41 AM
    0 responses
    20 views
    0 likes
    Last Post CarlTrading  
    Started by CaptainJack, 03-31-2026, 11:44 PM
    0 responses
    28 views
    1 like
    Last Post CaptainJack  
    Started by CarlTrading, 03-30-2026, 11:51 AM
    0 responses
    45 views
    0 likes
    Last Post CarlTrading  
    Started by CarlTrading, 03-30-2026, 11:48 AM
    0 responses
    37 views
    0 likes
    Last Post CarlTrading  
    Working...
    X