
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
Can you tell me how I can use LongCondition and ShortCondition to not only open but also close a position without opening the opposite position? For example, Signal threshold value to open = 30 and Signal threshold value to close = 70.
We want to open long when Condition1 is executed and close the position when Condition2 is executed. What values should LongCondition and ShortCondition return in this case?
If controlling the return values of LongCondition and ShortCondition is not enough, how can it be done? It is assumed that we are using only one signal.
Thanks.
Hi,
i followed all steps in the article, but i got it not work.
I saved the signal in the files \include\expert\signal\mysignals\samplesignal.mqh.
But it isn't recognized by the meta editor. I tried the same with the attached file in the article, no change...
My current Meta Editor version is 5.00 Build 567
Any ideas?
Thanks Mario
when I use the file that you attached to the article,there is something wrong.
I find the comment about Type should be as follows:
//| Type=SignalAdvanced |
when I use the file that you attached to the article,there is something wrong.
I find the comment about Type should be as follows:
//| Type=SignalAdvanced |
Hi All,
I downloaded the signal from this article and created a MQ5 using the wizard, but the EA does not make any trades. Any ideas?
I had to make the change in the above comments to get the signal to show up in the list, apart from that it compiled OK. Running the EA in the strategy tester does not do anything though :(
EDIT: After inserting print statements in all CSampleSignal class functions, and CExpertSignal class functions, it appears as if the inherited functions are not being overwritten by the CSampleSignal functions-
i.e. in this example, instead of these executing:
The following are executed:
Does that make sense? The functions from the parent class are being executed, when they are being overwritten in the child class ... Any help would be greatly appreciated!!
Hi All,
I downloaded the signal from this article and created a MQ5 using the wizard, but the EA does not make any trades. Any ideas?
I had to make the change in the above comments to get the signal to show up in the list, apart from that it compiled OK. Running the EA in the strategy tester does not do anything though :(
EDIT: After inserting print statements in all CSampleSignal class functions, and CExpertSignal class functions, it appears as if the inherited functions are not being overwritten by the CSampleSignal functions-
i.e. in this example, instead of these executing:
The following are executed:
Does that make sense? The functions from the parent class are being executed, when they are being overwritten in the child class ... Any help would be greatly appreciated!!
Hi Trolley,
i have the same problem. Have you found any solution or idea on it?
thanks
Good afternoon,
Please advise me how to increase (top up) a position in an Expert Advisor, which is written on the basis of MQL5 Wizard and where positions are opened via
virtual int LongCondition();
virtual int ShortCondition();
I wrote the robot according to the recommendations in the article
https://www.mql5.com/en/articles/367 "Create a trading robot in 6 steps" and it works fine, but attempts to influence the position size (no matter whether to increase or decrease)
(no matter whether to increase or decrease) through repeated generation of the condition in , for example in
LongCondition();
does not lead to anything, the already open position is not changed, it can only be deleted by executing the close condition or by triggering sl , tp.
I like the MQL5 Wizard, you can easily and quickly "build" a multi-indicator Expert Advisor, change the sl tracking module, change the money management module.
But my attempt to write an Expert Advisor that opens a minimum position when a condition is formed by one indicator and increases (fills) the position when the trend is confirmed by another indicator.
I came across the above described problem - the already opened position does not change when the signal to open it again is issued through. for example LongCondition();
Thank you.
The file from the article is not visible in the wizard, who is in the subject, please tell me what to tweak.
In the comments you need to replace the line
//| Type=Signal
to
//|| Type=SignalAdvanced.
After that my master started to see the signal.