Coding a profitable EA that backtests accurately can be somewhat straightforward, albeit not super easy. Example: Create a smoothed custom chart with its own OHLC bars and then 🥁🥁🥁... backtest on that OHLC data.🔔
Of course, you still need to determine your profitable hours, days, weeks, and/or months to trade; stoploss; trailing stoploss, dynamic exit, and/or takeprofit; news events to trade or news events to avoid; etc.
If spreads, commissions, and/or swaps are "killing" your strategy, then either your OHLC bars are too small or your logic/concept was junk from the get-go.
And finally, to each her/his own in this wide world of trading. There is no universal trading style for everyone.
Coding a profitable EA that backtests accurately can be somewhat straightforward, albeit not super easy. Example: Create a smoothed custom chart with its own OHLC bars and then 🥁🥁🥁... backtest on that OHLC data.🔔
Of course, you still need to determine your profitable hours, days, weeks, and/or months to trade; stoploss; trailing stoploss, dynamic exit, and/or takeprofit; news events to trade or news events to avoid; etc.
If spreads, commissions, and/or swaps are "killing" your strategy, then either your OHLC bars are too small or your logic/concept was junk from the get-go.
And finally, to each her/his own in this wide world of trading. There is no universal trading style for everyone.
One more thing that I forgot to say which may not be obvious to everyone...
To use the above method, your EA should send its orders upon bar close. This serves 2 purposes:
Sending orders at high or low prices is self-defeating for smoothing purposes. Remember that the idea is to make the close prices in your custom chart and the Tester align to a T (more accurately, a C). 😉
While different broker-dealers will likely have slightly different price data, the close prices of a smoothed custom chart will likely remain more universal among broker-dealers because the broker-dealer's source data is reduced to a "tick farm."
One more thing that I forgot to say which may not be obvious to everyone...
To use the above method, your EA should send its orders upon bar close. This serves 2 purposes:
Sending orders at high or low prices is self-defeating for smoothing purposes. Remember that the idea is to make the close prices in your custom chart and the Tester align to a T (more accurately, a C). 😉
While different broker-dealers will likely have slightly different price data, the close prices of a smoothed custom chart will likely remain more universal among broker-dealers because the broker-dealer's source data is reduced to a "tick farm."
“I’m already using bar-close execution, but the discrepancy is still significant.”
Muhammad Nurrochim #: “I’m already using bar-close execution, but the discrepancy is still significant.”
In your backtest, when it has placed the deal that has crashed it, was it at the same time, same openprice, same account balance, same leverage, same everything than in your real account ? I doubt it was : difficult to reproduce exactly.
You'd better work on a way to avoid those margin crash, for now you had luck on your real account.
Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.
You are signed in. Two-factor authentication has been disabled. Set it up again and scan a new QR code, or continue with two-factor authentication disabled.
Coding a profitable EA that backtests accurately can be somewhat straightforward, albeit not super easy. Example: Create a smoothed custom chart with its own OHLC bars and then 🥁🥁🥁... backtest on that OHLC data.🔔
Of course, you still need to determine your profitable hours, days, weeks, and/or months to trade; stoploss; trailing stoploss, dynamic exit, and/or takeprofit; news events to trade or news events to avoid; etc.
If spreads, commissions, and/or swaps are "killing" your strategy, then either your OHLC bars are too small or your logic/concept was junk from the get-go.
And finally, to each her/his own in this wide world of trading. There is no universal trading style for everyone.
Coding a profitable EA that backtests accurately can be somewhat straightforward, albeit not super easy. Example: Create a smoothed custom chart with its own OHLC bars and then 🥁🥁🥁... backtest on that OHLC data.🔔
Of course, you still need to determine your profitable hours, days, weeks, and/or months to trade; stoploss; trailing stoploss, dynamic exit, and/or takeprofit; news events to trade or news events to avoid; etc.
If spreads, commissions, and/or swaps are "killing" your strategy, then either your OHLC bars are too small or your logic/concept was junk from the get-go.
And finally, to each her/his own in this wide world of trading. There is no universal trading style for everyone.
One more thing that I forgot to say which may not be obvious to everyone...
To use the above method, your EA should send its orders upon bar close. This serves 2 purposes:
One more thing that I forgot to say which may not be obvious to everyone...
To use the above method, your EA should send its orders upon bar close. This serves 2 purposes:
“I’m already using bar-close execution, but the discrepancy is still significant.”
“I’m already using bar-close execution, but the discrepancy is still significant.”
In your backtest, when it has placed the deal that has crashed it, was it at the same time, same openprice, same account balance, same leverage, same everything than in your real account ? I doubt it was : difficult to reproduce exactly.
You'd better work on a way to avoid those margin crash, for now you had luck on your real account.