
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
Hello Viffer,
Sorry, can you explain me your last code,
with an example. I have read in mq4, but my englisch not so good.
I have tested the code with your last statement, and now on a few trades the EA modifed the SL, but not on all.
Thanks
The broker will have a minimum allowable distance for stops.... MarketInfo MODE_STOPLEVEL is retrieving the minimum distance and we get the price level of the minimum threshold (for long) by subtracting that value from bid. After we have set where we want NewSL, we need to check it is not above (for long) the allowable stop threshold. If it is, the modify will fail and the stop won't change so instead, we set NewSL to the minimum allowable distance. Obviously if NewSL is outside the minimum distance, it will modify OK.
V
Thanks for your answer,
Now i`ve tested my EA on an Demo Account, and there is a Problem. See the picture.
The problem always arises, if a longer upward phase (downward phase) is broken.
Assuming your options are set to allow both long and short positions, check your log for errors. Use GetLastError() and Print(). I suspect you will need also to test if the stops are allowable at ordersend.
V
Sorry V, my englisch and the translationprogramms are not the best. What are you meen with" I suspect you will need also to test if the stops are allowable at ordersend."
Another Question: SL 1.2988 ->Close Current Candle 1.2992 -> follow Current Candle open 1.2993 falling to 1.2990; MarketInfo Mode_Stoplevel 5 PIPS.
In this Example, the SL is not changed. But the candle should have to close by Market at 1.2991. Is there a possibility in MQL4 to code it. Thanks.
I have tested my idea at papertrading an the result are cut through 30 pips a day.
I have check all your proposals, but the EA don´t open a sell order.
What is the result of 1*Point????
.... What are you meen with" I suspect you will need also to test if the stops are allowable at ordersend." ....
Quattrofan:#
...But the candle should have to close by Market at 1.2991. Is there a possibility in MQL4 to code it....
Select the order, test your criteria and close it.
https://book.mql4.com/trading/orderclose
Quattrofan:What is the result of 1*Point????
https://docs.mql4.com/predefined/variables/Point
V