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 SalmaTrader, 07-07-2026, 10:26 PM
    0 responses
    54 views
    0 likes
    Last Post SalmaTrader  
    Started by CarlTrading, 07-05-2026, 01:16 PM
    0 responses
    25 views
    0 likes
    Last Post CarlTrading  
    Started by CaptainJack, 06-17-2026, 10:32 AM
    0 responses
    17 views
    0 likes
    Last Post CaptainJack  
    Started by kinfxhk, 06-17-2026, 04:15 AM
    0 responses
    23 views
    0 likes
    Last Post kinfxhk
    by kinfxhk
     
    Started by kinfxhk, 06-17-2026, 04:06 AM
    0 responses
    24 views
    0 likes
    Last Post kinfxhk
    by kinfxhk
     
    Working...
    X