[ARCHIVE]Any rookie question, so as not to clutter up the forum. Professionals, don't pass it by. Can't go anywhere without you - 5. - page 73

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
I have written a function that should determine whether the position exists based on the entered tag and comment. If not, it should return the permission to open it.
When I use one trade signal in the Expert Advisor, everything works fine: it opens a position only when there is no other with the same conditions. But when the Expert Advisor works with several types of signals that I label with a different comment, it opens multiple positions. What is the problem?
When such an order is placed, error 130 is generated. SellStop also opens similarly, but there are no errors in it.
Your "basic" for loop does not work. It will in any case say either true or false on the first order and will not look any further
When such an order is placed, error 130 is generated. SellStop also opens similarly, but there are no errors in it.
And how do the price specified in the order and the current market price correlate when an error occurs?
How does the price in the order relate to the current market price when an error occurs?
There is nothing wrong with the price, it is far away
Specify exact values and order type!!!
BuyStop is a pending order to buy assets in a financial instrument at a price higher than the current price. The order will be executed (converted into a market Buy order) if the Ask price reaches or is above the price stated in the order. What about the execution of the red condition?
BuyStop is a pending order to buy assets in a financial instrument at a price higher than the current price. The order will be executed (converted into a market Buy order) if the Ask price reaches or is above the price stated in the order. What about the execution of the red condition?
Type BUYSTOP. Even if we manually enter 1.3300 for EUR/Dollar and run the test today, the order will not open.
How to write it correctly, so that value of double is written only once and only at zero value. I tried if(recRes==0) recRes=NormalizeDouble(Res,5); but it does not work, the value is overwritten as soon as Res changes. What is the right way to implement it?
And what do you get?
What is therecRes type?
And what are the values ofRes?
BUYSTOP type. Even if I manually prescribe 1.3300 for Euro/Dollar and run a test for today, the order will not open.
What is the message when doing this?