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
EA Exit Problem
Dear Malden,
Greetings!
The basic EA author is firedave, I made the change of Entry & Exit conditions. The Entry Conditions were met, but the Exit condition (FastMA Crossed SlowMA) does not work at all. Can you please help me to take a look and correct my input
mistake?
You kind help are appreciated.
Thank you
...
harrytn
The source you posted does not compile (it has multiple errors in code that prevents it from compiling, you need to correct those first (the stuff like "3ymbol" which is written instead of "symbol", and similar) before proceeding)
Dear Malden,
Greetings!
The basic EA author is firedave, I made the change of Entry & Exit conditions. The Entry Conditions were met, but the Exit condition (FastMA Crossed SlowMA) does not work at all. Can you please help me to take a look and correct my input
mistake?
You kind help are appreciated.
Thank youEA Need Help
Dear Mladen,
I have no knowledge of coding, I just picked up here and there EA to come out with that, and I do not how to fix it at all, I hope you can help me that on my problem, I will really appreciated.
Below are the criteria:
Condition Buy:
M5 - FastMA5 above SlowMA21 & M60 - MACD5-21-1 above 0 & M240 - MACD2-21-1 above 0
Condition Sell:
M5 - FastMA5 below SlowMA21 & M60 - MACD5-21-1 below 0 & M240 - MACD2-21-1 below 0
Condition Buy Exit:
M5 - FastMA5 Cross Dn SlowMA21
Condition Sell Exit:
M5 - FastMA5 Cross Up SlowMA21
Thank you.
harrytn The source you posted does not compile (it has multiple errors in code that prevents it from compiling, you need to correct those first (the stuff like "3ymbol" which is written instead of "symbol", and similar) before proceeding)
...
harrytn
since there are too much error in the code you posted, can you post the original you worked on so that it can be altered to add that conditions you need?
Dear Mladen,
I have no knowledge of coding, I just picked up here and there EA to come out with that, and I do not how to fix it at all, I hope you can help me that on my problem, I will really appreciated.
Below are the criteria:
Condition Buy:
M5 - FastMA5 above SlowMA21 & M60 - MACD5-21-1 above 0 & M240 - MACD2-21-1 above 0
Condition Sell:
M5 - FastMA5 below SlowMA21 & M60 - MACD5-21-1 below 0 & M240 - MACD2-21-1 below 0
Condition Buy Exit:
M5 - FastMA5 Cross Dn SlowMA21
Condition Sell Exit:
M5 - FastMA5 Cross Up SlowMA21
Thank you.EA Need Help
Dear Mladen,
Thank you for your response.
Attached an original version EA for your attention! The followings are what I have made.
1. At extern string – Rename.
2. Changed StopLoss/TakeProfit/TrailingStop’s figure.
3. Input MA, MACD indicators and removed CCI indicator.
4. At extern bool - Removed OneEntryPerBar & ConfirmatedOnEntry.
5. At extern int – Changed Start/EndHour
6. At string – Rename.
7. At int start – Input indicators sign.
8. At bool – Added BuyExitCondition& SellExitCondition.
9. At SET VALUE FOR VARIABLE – Inputted MA & MACD indicators function.
10. At ENTRY CONDITION - Inputted condition.
11. Added BuyExitCondition& SellExitCondition.
The rest are remained at it is. You can help me re-code and remove the unnecessary.
Thank you for good help.
harrytn since there are too much error in the code you posted, can you post the original you worked on so that it can be altered to add that conditions you need?
...
harrytn
Now it compiles without error, and you can test it. Your conditions are left as you defined them (a set of new conditions) so you can continue working on it )I did not test how it works, all I did is made changes that allowed your conditions to be used and removed some errors that were in the code).
regards
Dear Mladen,
Thank you for your response.
Attached an original version EA for your attention! The followings are what I have made.
1. At extern string – Rename.
2. Changed StopLoss/TakeProfit/TrailingStop’s figure.
3. Input MA, MACD indicators and removed CCI indicator.
4. At extern bool - Removed OneEntryPerBar & ConfirmatedOnEntry.
5. At extern int – Changed Start/EndHour
6. At string – Rename.
7. At int start – Input indicators sign.
8. At bool – Added BuyExitCondition& SellExitCondition.
9. At SET VALUE FOR VARIABLE – Inputted MA & MACD indicators function.
10. At ENTRY CONDITION - Inputted condition.
11. Added BuyExitCondition& SellExitCondition.
The rest are remained at it is. You can help me re-code and remove the unnecessary.
Thank you for good help.Great Thank Mladen
Dear Mladen,
A great thank to your super response, I will test it and come to you if I have problem.
Many Thanks. Have a good day.
harrytn
Now it compiles without error, and you can test it. Your conditions are left as you defined them (a set of new conditions) so you can continue working on it )I did not test how it works, all I did is made changes that allowed your conditions to be used and removed some errors that were in the code).
regardsBUY / SELL EXIT CONDITION Need Help
Dear Mladen,
I applied on Strategy Tester and found the BUY/SELL EXIT CONDITION that the MA Exit CONDITION does not get out immediately MA crossed ..... instead of per-long get out someway? How to overcome this request, your kind help is appreciated.
Thank you
BuyCondition = (FMA1>SMA1 && vA2>0 && vA3>0);
SellCondition = (FMA1<SMA1 && vA2<0 && vA3<0);
BuyExitCondition = (FMA1<SMA1);
SellExitCondition = (FMA1>SMA1);
...
Forgot to tell
To use the additional exit conditions, I added one parameter : UseAdditionaExit. So, in order to use those exit conditions you defined set the UseAdditionaExit to true and test it then
Dear Mladen,
I applied on Strategy Tester and found the BUY/SELL EXIT CONDITION that the MA Exit CONDITION does not get out immediately MA crossed ..... instead of per-long get out someway? How to overcome this request, your kind help is appreciated.
Thank you
BuyCondition = (FMA1>SMA1 && vA2>0 && vA3>0);
SellCondition = (FMA1<SMA1 && vA2<0 && vA3<0);
BuyExitCondition = (FMA1<SMA1);
SellExitCondition = (FMA1>SMA1);Thanks Mladen
Dear Mladen,
The EA inputted by you is working perfect, again thank you so much your good work.
Thank you so much and ave a good times
Best Regards
Forgot to tell To use the additional exit conditions, I added one parameter : UseAdditionaExit. So, in order to use those exit conditions you defined set the UseAdditionaExit to true and test it then