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
you know what.. the Stop Loss mechanism doesn't seem to be working. It's not closing the position. What do you think it could be?
Entry is working fine.
Capture a screenshot of the errant trade, with chandelier.mq5 on display.
Yes, these lines should capture more signals than your original code, but still won't capture all. Example:
The circled bars will give you a close sell and open buy signal without a stop loss... so your 'if' checks must also consider such cases... or even look for additional indicators to complement this...
I've noticed this as well, seems to be a glitch/error? It happened once before already ...
I wouldn't say that without going deep into the indicator's code.
All I can say is you'll need to check the conditions thoroughly... e.g. when close cuts short_stop, close sell, but (1) don't open buy until long_stop appears... or (2) open a new sell if close cuts short_stop (i.e. trend continuation).
Another alternative is to consider closing with confirmation from other indicator...
I wouldn't say that without going deep into the indicator's code.
All I can say is you'll need to check the conditions thoroughly... e.g. when close cuts short_stop, close sell, but (1) don't open buy until long_stop appears... or (2) open a new sell if close cuts short_stop (i.e. trend continuation).
Another alternative is to consider closing with confirmation from other indicator...
gotcha.. thanks
this is what I did..
Capture a screenshot of the errant trade, with chandelier.mq5 on display.
Stop Loss still isn't working. It doesn't throw ANY errors, just does nothing.
This image shows basically what happens. Long Stop didn't trigger both times it should have.
And look at that weird red short stop below price, doesnt make sense.
In the other attached image its a short stop that doesnt trigger also.
gotcha.. thanks
this is what I did..
Modify it to:
adding a '!' is the same as having "==false"... and chandelier.mq5 uses EMTPY_VALUE (which equals to DBL_MAX), not 0, when there is no value.
Also, move the entire block after trade.PositionClose() outside the immediate 'if', because now when the opening condition is true, the close condition may be false already.
Stop Loss still isn't working. It doesn't throw ANY errors, just does nothing.
This image shows basically what happens. Long Stop didn't trigger both times it should have.
And look at that weird red short stop below price, doesnt make sense.
In the other attached image its a short stop that doesnt trigger also.
Check my reply above... then modify your code and see if these error still appear.
If they do, I need to see your latest code to be sure of what went wrong.
Modify it to:
adding a '!' is the same as having "==false"... and chandelier.mq5 uses EMTPY_VALUE (which equals to DBL_MAX), not 0, when there is no value.
Also, move the entire block after trade.PositionClose() outside the immediate 'if', because now when the opening condition is true, the close condition may be false already.
This is the whole EA code:
I'm sorry not exactly sure what you meant at the end.
This is the whole EA code:
Ok, try changing this block:
into (note the changes in {}, and the highlighted new parts):
Do the same for sell. No more "else" between the outermost "if"s.
Ok, try changing this block:
into (note the changes in {}, and the highlighted new parts):
Do the same for sell. No more "else" between the outermost "if"s.
I had it work only one time, but still the last order failed with error 4756.
Stop Loss fails with message: "CTrade::PositionClose() method failed. Return code=10006."
Some entries also execute at unusual prices. See picture.
Why is the buy entry price above the actual candle body?
Stop Loss failed again at 18:30. See 2nd pic.