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 need to re-think your code.
buy_hedge==0 && sell_hedge==0 && OrderOpenPrice()>Bid+Hedge*Pip)
These will always be true as you set them both to zero and don't change them. You don't enclose the following block of code in curly braces {}
You don't use the GV to check anything and you name it with an integer. The check does nothing as you don't assign the returned bool to any variable.
Check whether the OrderSend fails, and if it does, print the error code.
You need to re-think your code.
These will always be true as you set them both to zero and don't change them. You don't enclose the following block of code in curly braces {}
You don't use the GV to check anything and you name it with an integer. The check does nothing as you don't assign the returned bool to any variable.
Check whether the OrderSend fails, and if it does, print the error code.
Thank you. I think I am on the right track, but now it will open multiple hedge trades even though it states total<=1. My code now looks like this:
Thank you for this advice. I finally figured it out and it now works. The bit of code looks like this:
What is the point of setting the GV then immediately deleting it?
What is the point of setting the GV then immediately deleting it?
Makes sense thank you. So is it better like this:
Makes sense thank you. So is it better like this:
No, it still makes no sense at all.
There should be a reason to delete the GV
No, it still makes no sense at all.
There should be a reason to delete the GV
Thank you again. How about this?
Thank you again. How about this?
It still doesn't make sense
The code block is only executed if total==1, so the check if(total<1) will always be false.