Why Identical Charts Are Showing Different Strategy Trading Results
One should not expect 100% identical results between backtesting, calculating in real-time (forward testing) and auto trading charts. The results may be close but it is almost impossible to make them absolutely the same.
Difference in Order Execution
Even if two charts (chart A is auto trading and chart B is calculating in real-time) are set up identically to generate the same orders on the same bars, the execution of those orders depends on different factors for each of the charts. To learn more, please read about the general differences in the results of Backtesting vs Live Trading.
Different Starting Points of Strategy Calculation
When a chart is created and a strategy is applied to the chart, it is backtested, immediately displaying entries and exits. It is important to understand that the calculation's starting point in this case is not the first bar due to MaxBarsBack value (aka the Maximum number of bars a study will reference) the first bar when an order can be generated (to be placed on next bar) is bar # X, where X = MaxBarsBack value + 1.
In SA mode when you click the button to toggle automation on, the starting point of an order generation on chart A is shifted from the beginning of the chart to the bar before the current bar and the strategy is recalculated. Meanwhile, if you create an identical chart B nearby to see the strategy calculating in real-time (forward testing) and you expect to see at least the first order triggered at the same time on the same bar as on chart A, you should perform a calculation to find out the correct data range setting for chart B so that both charts' strategies have the same order generation starting points. If the starting points are different, then the results are also different.
To summarize: it is hard, but it is possible to get at least first identical trade on 2 charts (chart A is auto trading, chart B is calculating in real-time), though it doesn't mean it is possible to make all trades 100% the same between these 2 charts.
Auto trading in asynchronous mode shows all the orders generated by your strategy on chart and the starting points of script calculation are the same on chart A that is auto trading in AA and the same chart B that is calculating in real-time nearby, but this mode is supposed to give you different picture on chart and at broker end by its design.