Somebody help me on this code !!!

 

I am try to write a EA help me to check Candle sticks, but i don't know how to coding it, somebody who expert MQL4, please ! help me .

- I have a Candle sticks on time frame M1 .

- One Bollinger bands with Period is 18.

- One Moving Average (3, exponential, close).

- One MACD Histogram.

- One RSI with period is 14.

Now i want to check when EMA 3 cut down Middle Bollinger bands and RSI 14 over 50% and MACD Histogram over 0 the code return to me BUY. IF EMA 3 cut down Middle Bollinger bands and RSI 14 below 50% and MACD Histogram below 0 the code return to me SELL.

If somebody have not time, just help me how to check the EMA cut down Middle Bollinger bands . That's all.

I really need somebody help.Thank you very much !

Images

 
tieuthienma:

I am try to write a EA help me to check Candle sticks, but i don't know how to coding it, somebody who expert MQL4, please ! help me .

- I have a Candle sticks on time frame M1 .

- One Bollinger bands with Period is 18.

- One Moving Average (3, exponential, close).

- One MACD Histogram.

- One RSI with period is 14.

Now i want to check when EMA 3 cut down Middle Bollinger bands and RSI 14 over 50% and MACD Histogram over 0 the code return to me BUY. IF EMA 3 cut down Middle Bollinger bands and RSI 14 below 50% and MACD Histogram below 0 the code return to me SELL.

If somebody have not time, just help me how to check the EMA cut down Middle Bollinger bands . That's all.

I really need somebody help.Thank you very much !

help with what what have you done ??
show what you made.... if you tried to make it

 
Hi ! i just want to know how can i write a code check the Moving Average line cut down the Middle Bollinger bands line. Really thank you if someody can help !
 
tieuthienma:
Hi ! i just want to know how can i write a code check the Moving Average line cut down the Middle Bollinger bands line. Really thank you if someody can help !


then show the part how you get values of your moving average line

and values of bollinger bands....

is that difficult to do ???

 
Yes ! it is difficult, so i need somebody help me write a code with MQL4, like i said, i need to check the Moving Average cut the Middle of Bollinger bands in chart.Can you help me ?
 
tieuthienma:
Yes ! it is difficult, so i need somebody help me write a code with MQL4, like i said, i need to check the Moving Average cut the Middle of Bollinger bands in chart.Can you help me ?


then here you have a start to see how you have to program moving average to get values from it iMA

show the code how to get Moving Average (3, exponential, close). values for bar 0, 1, 2, and 3

 

Hey,

There isnt a middle Bollinger band as such. Basically for your query, you need the two moving averages, 3 and 18 and check whether MA3 <> MA18 . That should suffice.

 
I did a quick visual backtest and this strategy doesn't seem to work. As Ninad said above, there is no such a thing as a middle bollinger. I used a 18 SMA, which is equivalent to what you suggested.
 
bentbawer:
I did a quick visual backtest and this strategy doesn't seem to work. As Ninad said above, there is no such a thing as a middle bollinger. I used a 18 SMA, which is equivalent to what you suggested.


it doesn't matter if you don't know how to use the code of a moving average

then you still don't know what to do if someone is telling you the equivalent of middle bollinger

think tieuthienma was searching someone to write his code instead of helping on his code

 
Isn't the centre line that from which the outer lines' deviation is calculated? One thing is for sure, it's worth plotting that line as it is often a place of price reaction.
 

Hello ! everybody, this is what i done but i think it's cut, not cut down. Somebody help me :

int Order = SIGNAL_NONE;


double iBB = iBands(NULL,0,18,2,0,PRICE_CLOSE,MODE_SIGNAL,0);

double EMA = iMA(NULL,0,3,1,MODE_EMA,PRICE_CLOSE,0);

double MACD = iMACD(NULL,0,12,26,9,PRICE_CLOSE,MODE_SIGNAL,0);

double RSI = iRSI(NULL,0,14,PRICE_CLOSE,0);

if(iBB==EMA && RSI > 50 && MACD > 0 ) Order = SIGNAL_BUY;

if(iBB==EMA && RSI < 50 && MACD < 0 ) Order = SIGNAL_SELL;

//==================================================================

if (Order == SIGNAL_BUY){

Print("I am ready to BUY");

}

if (Order == SIGNAL_SELL){

Print("I am ready to SELL");

}