Any rookie question, so as not to clutter up the forum. Professionals, don't pass by. Nowhere without you - 6. - page 386
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
Look at this line
else if (order_type = OP_SELL()
And this one.
I see in the new code (which is below in the post) the default parameter passed to the function has changed:
The original version had a different Magik. I've corrected the reference to this function in my code. Look under which Magik the orders are open now and put this Magik number in your EA.
No, the magik is correct, the one for EURAUDUSD is 1111 and the one for EURUSD_GBPUSD is 1114 (another person helped me to correct it). Both trades do not close. I'm watching the total profits of EURUSD_GBPUSD, but my Expert Advisor is unable to close it. I have modified your version for EURAUD_AUDUSD - 1111 for EURUSD_GBPUSD - 1114, it still does not close deals. The feature of the owl is that you cannot test it in the tester (because two pairs are traded) - only on a demo.
No, the mage is correct, the one for EURAUD_AUDUSD is 1111 and the one for EURUSD_GBPUSD is 1114 (another person helped me correct it). Both trades do not close. I'm watching the total profits of EURUSD_GBPUSD, but my Expert Advisor is unable to close it. I have modified your version for EURAUD_AUDUSD - 1111 for EURUSD_GBPUSD - 1114, it still does not close deals. The feature of the owl is that I cannot test it in the tester (because two pairs are traded) - only on a demo.
Let's make some changes. Instead of
put
run the EA, set the profit to zero and see what came out and what's in the logs.Look at this line
else if (order_type = OP_SELL()
thanks!)
No according to the majik everything is correct, the one for EURAUD_AUDUSD is 1111 and the one for EURUSD_GBPUSD is 1114 (another person helped to fix it). Both trades do not close. I'm watching the total profits of EURUSD_GBPUSD, but my Expert Advisor is unable to close it. I have revised your version for EURAUD_AUDUSD - 1111 for EURUSD_GBPUSD - 1114, it still does not close deals. The feature of the owl is that you cannot test it in the tester (because two pairs are traded) - only on a demo.
Firstly, you are not addressing the indicator correctly. This indicator has a lot of external parameters:
and they need to be listed when you call the indicator. If you omit them, the parameters will be taken by default, and since you want to use it for different currency pairs, this option is not suitable. And everything else can be done taking into account the changes of parameters at the start of the EA:
Read about indicator call here.
Let's make some changes. Instead of
put
run the EA, set the profit to zero and see what came out and what's in the logs.The result is ugly. With your changes and profit equal to 0, the Expert Advisor has closed all positions on Meijic 1111, 1112, 1113, 1114, 1115. Then, after 5 seconds, new orders for these Meijic symbols were opened and after 10 seconds, they all got closed and the same thing happened again. The positions were not opened in pairs, but chaotically.
This has turned out to be a scary one. With your changes and profit equal to 0, the EA closed all positions on Majic 1111, 1112, 1113, 1114, 1115 at all. Then, after 5 seconds, new orders for these Meijic symbols were opened and after 10 seconds, they all got closed and the same thing happened again. The positions were not opened in pairs, but chaotically.
My guiding question is: how many EAs do you have in this account?
And you had a condition - to close all orders on profit.
PS You have seen the pitfall you have with this EA - it will keep opening orders after closing, which will eventually lead to a loss. So you have to put a flag prohibiting the placing of new orders until the conditions pass and arise again.
Firstly, you are not addressing the indicator correctly. This indicator has a lot of external parameters:
and they need to be listed when you call the indicator. If you omit them, the parameters will be taken by default, and since you want to use it for different currency pairs, this option is not suitable. Everything else can be done considering the changes of parameters at the start of the EA:
You can read about calling the indicator here.
A guiding question - how many EAs do you have in this account?
And you did have a condition - to close all orders on profit.
PS You have seen the pitfall you have with this EA - it will keep opening orders after closing, which will eventually lead to a loss. So you have to put a flag prohibiting the placing of new orders until the conditions pass and arise again.
The Expert Advisors worked for 5 (twin brothers - for different pairs), of course with different Meijic.
Yes, we had the profit condition to close the orders but the orders were related to a certain EA, for example, with MAJIC 1114. I wrote about it from the very beginning and believed that owl does not see its own orders at closing; it turns out that it sees all orders and wants very much to close them but we do not need all of them but some specific ones.
If we take H4 period, when the indicator lines are higher than 0.1 and lower than -0.1, the condition is satisfied and the deals are opened, i.e., it is possible to take several profits at one signal (though there is an option to close deals when indicator lines converge).
Thank you. I know about the indicator call. But the adjustable parameters of the indicator should be listed when we apply them in testing or in operation and since this EA cannot be tested in the tester (as two pairs are involved in trading), we simply cannot choose these parameters on the history.
Another small question we have in two instruments trades open either to sell or to buy, but if we need one to open to sell for one instrument and another to open to buy, then how?
How you specify the conditions for opening, that's how the orders will be opened. If you do not know what the indicator says, I cannot help you.
There were 5 EAs working (twin brothers - for different pairs), of course with different Majics.
In your version, the work with the Magician is not specified correctly. The orders are opened with the specified Magik, but the check for orders in the market is performed with the default Magik. It should be like this: