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
Yes, you have to reselect the order
With the above code, you create a new variable to store the ticket number, then you can select the trade by its ticket number
Yes, you have to reselect the order
With the above code, you create a new variable to store the ticket number, then you can select the trade by its ticket number
Awesome!!!!!! Thank you so much for this. After many weeks everything is now working. I have learned a lot. Thank you everyone!!!
Sorry but I spoke too soon. The Trailingstop only kicks in sometimes, so I think the code is still broken somewhere. Here is the entire EA. Will someone please check and let me know if you spot a mistake. Thank you
,
,
Thank you so much for pointing that out. I fixed the mistake and its working now. I have another question. I'm trying to have the message box pop-up when my stoploss is less than the broker's STOP_LEVEL, but it pops up even when it is more. I tried to put it in the 'start' section rather than the 'init' section, but it does not work there either. Will someone please take a look and let me know what is wrong. Thank you
if ((StopLoss || Stoploss || TrailingStop) < stoplevel)
doesn't make sense
do you mean?
if ((StopLoss < stoplevel || TrailingStop) < stoplevel)
doesn't make sense
do you mean?
Hi Everyone, I ran into a snag again. It's very strange and I cannot understand why this is happening. As I mentioned above, the EA worked fine, but now I simply want to change from this
to
I am not touching anything else, but after this simple change neither the Trailing stop nor the hedge gets triggered. Its weird. The full code is above
Thank you for your reply, but I do not understand. The code for the Trailing stop is here
If I have a Stoploss, the EA works and the Trailingstop and hedge kicks in, but if I change the Stoploss to 0, nothing works. I don't see how and why the Stoploss would have any influence on the Trailingstop and hedge?