Backtesting Profits But Live Demo Account fail How to optimize?


I code EA and backtesting  until got profits but when testing on Live demo it is fail 

How to debug on Live demo?

please help to guide line

or have any article recommend to read and study

Testing trading strategies on real ticks
Testing trading strategies on real ticks
The article provides the results of testing a simple trading strategy in three modes: "1 minute OHLC", "Every tick" and "Every tick based on real ticks" using actual historical data.

Az first I think of account size and EA MM - probably the demo account size is smaller than what you set in backtest.

With a backtest report and demo account report details it would be easier to guess closer.