Here's results for getting the last bar, which should be shift = 0, to represent the current bar.
I don't understand what's going on. Try dropping the indicator on a chart and do a backtest with some test EA that uses iCustom and you will see that chart and backtest just don't tie up.
iCustom works the same if you call it from a script or an EA, and as you can see from your results it is producing correct values in both backtesting and on the charts.
There has to be something wrong with the code you're not showing, or your interpretation of the print statements generated by the code you're not showing.
I'm afraid there isn't much more I can do... iCustom works as you can see.
iCustom works the same if you call it from a script or an EA, and as you can see from your results it is producing correct values in both backtesting and on the charts.
There has to be something wrong with the code you're not showing, or your interpretation of the print statements generated by the code you're not showing.
I'm afraid there isn't much more I can do... iCustom works as you can see.
Thanks alot for your help. Much appreciated. I'll dig deeper. Chart shows me certain points when I should enter a trade, but the EA doesn't enter a trade because it doesn't have the same value as the chart. I'll try and debug further.
Hi Sameer, I have the same problem with any icustom indicator on MT5 - the values do not match the chart - did you ever have any joy in resolving the problem ?
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.
Here's results for getting the last bar, which should be shift = 0, to represent the current bar.
I don't understand what's going on. Try dropping the indicator on a chart and do a backtest with some test EA that uses iCustom and you will see that chart and backtest just don't tie up.
iCustom works the same if you call it from a script or an EA, and as you can see from your results it is producing correct values in both backtesting and on the charts.
There has to be something wrong with the code you're not showing, or your interpretation of the print statements generated by the code you're not showing.
I'm afraid there isn't much more I can do... iCustom works as you can see.
iCustom works the same if you call it from a script or an EA, and as you can see from your results it is producing correct values in both backtesting and on the charts.
There has to be something wrong with the code you're not showing, or your interpretation of the print statements generated by the code you're not showing.
I'm afraid there isn't much more I can do... iCustom works as you can see.
Thanks alot for your help. Much appreciated. I'll dig deeper. Chart shows me certain points when I should enter a trade, but the EA doesn't enter a trade because it doesn't have the same value as the chart. I'll try and debug further.
Once again, thanks alot!