- Find the current trade and do nothing.
- If there isn't any, find the latest trade from history. Remember its type.
- Test for your condition(s) matching the opposite type, and open.
William Roeder #:
Thanks for the response. In terms of automating the entire process with the EA, how could you code this?
- Find the current trade and do nothing.
- If there isn't any, find the latest trade from history. Remember its type.
- Test for your condition(s) matching the opposite type, and open.
BernhardHVL #: In terms of automating the entire process with the EA, how could you code this?
Exactly as written. Order/Position select loop, static or global variable to remember. Etc.
You haven't stated a problem, you stated a want. Show us your attempt (using the CODE button) and state the nature of your difficulty.No free help (2017)
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
Good day,
I have put together an EA based on the conditions is above/is below so the signal is continuous. However I would like the EA to put in one trade on the initial signal only, close after TP, then only open after there has been the opposite buy/sell signal and conditions have been met.
For example: Is above conditions are met, one BUY signal sent, trade closed after TP reached - Is below conditions are met, one SELL signal sent, trade closed after TP reached - Is above conditions are met, one BUY signal sent, trade closed after TP reached etc..
Basically 1 Buy - 1 Sell -1 Buy - 1 Sell - 1 Buy - 1 Sell etc..
Is there any way to code this?