Can someone pls assist in coding this in Mt5 for 1min timeframe only. Rough sample in Mt4 is below:
//Step1: Bar2 RSI_2(13) was prev abv or equal to 34 but on Bar1 RSI_1(13) now below 34. //RSI is setting 13 if(RSI_2>=34 && RSI_1<34 && W1 != "yes") {W1="yes";W1_high=barhigh1;W1_low=barlow1;count=0;Repeat_Signal=0;}
//Step2: At d point whr RSI<34 we want to do 2 things:1. Begin to update d Lower low of W1 until price closes above d High of d Lowest - when this happens, it means W2 has been formed. 2. Begin to setup a counter: if(W1=="yes" && W2!="yes" && barlow1<W1_low) {W1_high=barhigh1;W1_low=barlow1;
//Step3: Whn price closes abv d high of W1's lowest bar then W2 is formed. if(W1=="yes" && W2!="yes" && barclose1>W1_high{W2="yes";}
//Final step: If W2 is yes, then whenever a Hammer occurs whose Tail is d lowest among d last 3 candles, starting fro itself, then signal an ArrowUp on d chart on bar zero. Except if count is >=15. Note: THE HAMMER IS A CANDLE WHOSE TAIL IS >= 60% OF ENTIRE LENGTH OF D CANDLE. if(W2=="yes" && Hammer=="yes" && barlow1<=Lowest && Repeat_Signal<1) { Alert(Symbol()," ","Buy"); ArrowBuffer[0] = barlow1 - 0.5 * dPoint; W1="nil";W2="nil";Repeat_Signal=1;
} //List of variables: string W1,W2; double Repeat_Signal,barlow1,barhigh1,W1_high,W1_low,Lowest,count; //END
Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.
You are signed in. Two-factor authentication has been disabled. Set it up again and scan a new QR code, or continue with two-factor authentication disabled.
Can someone pls assist in coding this in Mt5 for 1min timeframe only. Rough sample in Mt4 is below:
//Step1: Bar2 RSI_2(13) was prev abv or equal to 34 but on Bar1 RSI_1(13) now below 34. //RSI is setting 13
if(RSI_2>=34 && RSI_1<34 && W1 != "yes")
{W1="yes";W1_high=barhigh1;W1_low=barlow1;count=0;Repeat_Signal=0;}
//Step2: At d point whr RSI<34 we want to do 2 things:1. Begin to update d Lower low of W1 until price closes above d High of d Lowest - when this happens, it means W2 has been formed. 2. Begin to setup a counter:
if(W1=="yes" && W2!="yes" && barlow1<W1_low)
{W1_high=barhigh1;W1_low=barlow1;
count=count+1;
if(count>=15) {W1="nil";W2="nil";} //Nullifier
//Step3: Whn price closes abv d high of W1's lowest bar then W2 is formed.
if(W1=="yes" && W2!="yes" && barclose1>W1_high{W2="yes";}
//Final step: If W2 is yes, then whenever a Hammer occurs whose Tail is d lowest among d last 3 candles, starting fro itself, then signal an ArrowUp on d chart on bar zero. Except if count is >=15.
Note: THE HAMMER IS A CANDLE WHOSE TAIL IS >= 60% OF ENTIRE LENGTH OF D CANDLE.
if(W2=="yes" && Hammer=="yes" && barlow1<=Lowest && Repeat_Signal<1)
{
Alert(Symbol()," ","Buy");
ArrowBuffer[0] = barlow1 - 0.5 * dPoint;
W1="nil";W2="nil";Repeat_Signal=1;
}
//List of variables:
string W1,W2;
double Repeat_Signal,barlow1,barhigh1,W1_high,W1_low,Lowest,count;
//END