
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
Dear great programmers,
please help me to modify this Ea to make the possibility of open only buy or only sell order at the start of every cycle.
Sorry for my english.
Thanks
Mark010breakouthedge.mq4
Dear great programmers,
please help me to modify this Ea to make the possibility of open only buy or only sell order at the start of every cycle.
Sorry for my english.
Thanks
Mark010breakouthedge.mq4Mark010
Do you have the original source code? That is a decompiled code and I doubt that you will get some help with decompiled code changes
I don't have it.
Thanks anyway
elcomepips Here you go
hey mladen,
I saw you coded it very well. Which buffers do I have to import with iCustom() to make an EA out of that. I only want to know if I have to go long or short.
Thanks in advance.
hey mladen,
I saw you coded it very well. Which buffers do I have to import with iCustom() to make an EA out of that. I only want to know if I have to go long or short.
Thanks in advance.arroganzmaschine
You can use buffer 2 for that. When the value in it is 1, then the trend is up, if the value is -1 then the trend is down. The code could look like this :
double previousTrend = iCustom(NULL,0,"MA crosses arrows_alerts mtf","",FastMa,FastMaShift,FastMAMethod,FastMAPrice,SlowMa,SlowMaShift,SlowMAMethod,SlowMAPrice,2,2);
if (currentTrend != previousTrend)
{
if (currentTrend == 1) // buy signal
if (currentTrend == -1) // sell signal
}
arroganzmaschine
You can use buffer 2 for that. When the value in it is 1, then the trend is up, if the value is -1 then the trend is down. The code could look like this :
double previousTrend = iCustom(NULL,0,"MA crosses arrows_alerts mtf","",FastMa,FastMaShift,FastMAMethod,FastMAPrice,SlowMa,SlowMaShift,SlowMAMethod,SlowMAPrice,2,2);
if (currentTrend != previousTrend)
{
if (currentTrend == 1) // buy signal
if (currentTrend == -1) // sell signal
}
How do I have to define FastMa etc? That doesn't work, because it doesn't exist.
How do I have to define FastMa etc? That doesn't work, because it doesn't exist.
You have to declare them as external variables (exactly the same as in indicator parameters). Like this :
extern int FastMaShift = 0;
extern int FastMAMethod = MODE_LWMA;
extern int FastMAPrice = PRICE_CLOSE;
extern int SlowMa = 13;
extern int SlowMaShift = 0;
extern int SlowMAMethod = MODE_LWMA;
extern int SlowMAPrice = PRICE_CLOSE;
use any default values you like instead of the ones from the code above
You have to declare them as external variables (exactly the same as in indicator parameters). Like this :
extern int FastMaShift = 0;
extern int FastMAMethod = MODE_LWMA;
extern int FastMAPrice = PRICE_CLOSE;
extern int SlowMa = 13;
extern int SlowMaShift = 0;
extern int SlowMAMethod = MODE_LWMA;
extern int SlowMAPrice = PRICE_CLOSE;
Thank you very much! How can I only one order if the currentTrend==1?
I don't want to open massive orders.
Thank you very much! How can I only one order if the currentTrend==1? I don't want to open massive orders.
Either use OrdersTotal() < 1 or use some orders counting function for current symbol and magic number
Hello Mladen.You made the version this indicator. I want to ask to make here separately moving average, as on the example of other indicator if it is possible.
Thank you.