You have not provided sufficient information, nor code, to be able to identify the problem.
However, please note that ObjectGetValueByShift will not work in the Strategy Tester during optimisations, and you will have to use other options.
Forum on trading, automated trading systems and testing trading strategies
How optimize objectget() / ObjectGetValueByShift() function in EA
Fernando Carreiro, 2022.04.19 11:29
Graphical objects are not used during optimisations, so instead use the equivalent math to calculate the value. This will also be much faster than using ObjectGetValueByShift().
For example, instead of using a trend-line object, just use the math for a line "y = m * x + c" to calculate the values.
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hello everyone.
I am trying to code buy order execution when the Bid reach above a price that ObjectGetValueByShift will get
the object is a Trendline
the problem is orders keep executing although the bid is below the price, and I printed the price and it was correct and way above the bid and ask
Please advise
Thanks for the help