Login Page - Create Account

Support Board


Date/Time: Mon, 29 Apr 2024 05:37:13 +0000



Post From: ACSIL Buy/Sell Exit Executes Perfectly in Replay but Not Live

[2020-02-09 23:49:18]
User650124 - Posts: 6
Hi, I've been struggling on troubleshooting what's going with my strategy lately and so I'm turning to the support board for some help and ideas. I use a crossover condition to exit trades in my strategy and when I replay backtest it works perfectly, but when I'm live trading for some reason the trades are exiting randomly when they're not supposed to. The trade log is indicating that the exits are being triggered by my strategy so I've ruled out anything with the sierrachart trade management. My entry conditions have been working perfectly, just a discrepancy in the exits. I've let the strategy trade live then backtested over the same data later and seen the same results, where the trade exits are seemingly being triggered randomly in live but in replay they've been triggered perfectly. An example of my exit condition code is below, If anyone has any ideas please let me know. Thanks!


      // Buy Exit Condition
    else if (sc.CrossOver(sc.BaseData[SC_HIGH], sc.Subgraph[12]) == CROSS_FROM_BOTTOM &&
    AbsQuantity > 0)
    {
      int Result = (int)sc.BuyExit(NewOrder);
      if (Result > 0) //If there has been a successful order exit, then draw an arrow at the high of the bar.
      {
        BuyExitSubgraph[sc.Index] = sc.High[sc.Index];

      }
    }