Any rookie question, so as not to clutter up the forum. Professionals, don't pass by. Nowhere without you - 6. - page 987
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Why does the debugger "crash" when debugging the indicator (because it accesses the array boundaries), but at the same time everything is drawn normally on the chart?
MT4 build 950, Alpari demo.
The indicator is attached.
Not a newbie, but there is a "silly" question, as I have hardly ever encountered such a situation.
Suppose there is a pending order already set.
We use the indicator to move its price.
At one moment, the order cannot be modified because the new price has got into the prohibited range due to the stop signs like Ask/Bid +/- MarketInfo(Symbol(), MODE_STOPLEVEL / MODE_FREEZELEVEL).
But the order has to be opened "by the market".
What can we do in this case?
Can we delete the pending order and open a new one by the market?
Or, is it possible to change the pending order into an open one?
Hi all!
Not a newbie, but there is a "silly" question, as I have hardly ever encountered such a situation.
Suppose there is a pending order already set.
We use the indicator to move its price.
At one moment, the order cannot be modified because the new price has got into the prohibited range due to the stop signs like Ask/Bid +/- MarketInfo(Symbol(), MODE_STOPLEVEL / MODE_FREEZELEVEL).
But the order has to be opened "by the market".
What can we do in this case?
Can we delete the pending order and open a new one by the market?
Or the pending order can be somehow transformed into an open one?
Please help.
When I install an EA on a standalone chart, the EA does not work, because the start() function is not started.
How can I implement a chart update from an EA which builds it, or from an EA which is attached to this chart?
If in such close proximity to the price, the price will find it on its own, and if not, maybe it's for the best if it's a stop! And the limit one, then patience. Try to experiment in the tester, and the optimization will determine the best variant! Good luck!
Thank you! But I need an answer to my question - if an order has to be triggered regardless of where the price goes now, what should I do? Should I delete the pending order and open a regular one?
For me, if you follow your strategy, then follow it! I don't recommend changing it halfway through, otherwise without certain results (positive or negative), you cannot be sure of the rationality of your strategy. That's it!
Thank you again! You say the right things, but irrelevant to the question. :) Once again: If the calculated price of a pending order has hit the prohibited range and it cannot be modified, but must (according to the strategy) trigger at the calculated price - how do I "turn" it into a triggered one? To delete it and open it as a normal one? Or there are other options? Please answer exactly this question.
To be specific to your question. First remove the pending order and then immediately open a position at the current price. The problem is that during these actions, the price can move out of the freeze zone (to the worse) and the position will be opened at a wrong price. Another option is not to create a pending order and store the value to open the position in a variable in the program. Compare it with the current price and if the condition is met (taking into account the freezing zone), you open a position.
There is inconsistency in this approach. If we expect to open a position already in the "freeze" zone (when modification is impossible) of a pending order, then we should have originally placed the order at another price, at the boundary of this "freeze" zone. That is why your approach is not accepted by many people.
To be specific to your question. First remove the pending order and then immediately open a position at the current price. The problem is that during these actions, the price can move out of the freeze zone (to the worse) and the position will be opened at a wrong price. Another option is not to create a pending order and store the value to open the position in a variable in the program. Compare it with the current price and if the condition is met (taking into account the freezing zone), you open a position.
Paladin80, everything you write about, I know very well. And about freezing and unfreezing and the boundary, etc.
The only question was whether the pendulum should be deleted and put a regular one, if a strategy is required (!).
That is, the pendulum at the "now" price will not work (but I want it to work and I can't afford to wait).
Thank you!