Dear FF's Tech Platform Gurus, so i'm super baby at coding, i found a very good S/R Indicator . i was trying to add a little additional condition alert when ever price touches Support and Demand Area
with this code:
But it didn't give us any alert, but as soon as i removed these parts\
it gives alert perfectly, i think this was due to the original coder has set the code to only alert once after the price hits a certain area. as with those additional condition sometimes price needs to pierce deeper into the S/R Area hence it won't alert again since the designed area has passed once and will not be alerted again?
How can we fix this so it could give alert as i wanted to. May God bless any Hero with unlimited amount of Goodness who could give a hand helping me fixing my dream indicator. thanks in advance!
with this code:
Inserted Code
double mMacd = iMACD(NULL, 0, 12, 26, 9, PRICE_CLOSE, 0, 0); double mMacdS = iMACD(NULL, 0, 12, 26, 9, PRICE_CLOSE, 1, 0); double rsi_1_m5 = iRSI(NULL, PERIOD_M5, 7, PRICE_CLOSE,0); double Low_m5 = iLow(NULL,PERIOD_M5,0); double High_m5 = iHigh(NULL,PERIOD_M5,0); double bb_upper_m5 = iBands(NULL, PERIOD_M5, 20, 2, 0, 0, MODE_UPPER, 0); double bb_lower_m5 = iBands(NULL, PERIOD_M5, 20, 2, 0, 0, MODE_LOWER, 0);
Inserted Code
void CheckAlert(){ // SupCount DemCount // SupAlert DemAlert double price = ObjectGet(lzone+TAG+"UPAR"+SupAlert,OBJPROP_PRICE1); if(Close[0] > price && mMacd < mMacdS && mMacd > 0 && price > point && High_m5 > bb_upper_m5 && rsi_1_m5 >= 70){ if(AlertPopup) Alert(pair+" "+TimeFrameToString(tf)+" Supply Zone Entered at "+DoubleToStr(price,Digits)); PlaySound(AlertSound); SupAlert++; } price = ObjectGet(lzone+TAG+"DNAR"+DemAlert,OBJPROP_PRICE1); if(Close[0] < price && mMacd > mMacdS && mMacd < 0 && Low_m5 < bb_lower_m5 && rsi_1_m5 <= 30 ){ Alert (pair+" "+TimeFrameToString(tf)+" Demand Zone Entered at "+DoubleToStr(price,Digits)); PlaySound(AlertSound); DemAlert++; } }
But it didn't give us any alert, but as soon as i removed these parts\
QuoteDislikedvoid CheckAlert(){
// SupCount DemCount
// SupAlert DemAlert
double price = ObjectGet(lzone+TAG+"UPAR"+SupAlert,OBJPROP_PRICE1);
if(Close[0] > price && mMacd < mMacdS && mMacd > 0 && price > point && High_m5 > bb_upper_m5 && rsi_1_m5 >= 70){
if(AlertPopup) Alert(pair+" "+TimeFrameToString(tf)+" Supply Zone Entered at "+DoubleToStr(price,Digits));
PlaySound(AlertSound);
SupAlert++;
}
price = ObjectGet(lzone+TAG+"DNAR"+DemAlert,OBJPROP_PRICE1);
if(Close[0] < price && mMacd > mMacdS && mMacd < 0 && Low_m5 < bb_lower_m5 && rsi_1_m5 <= 30 ){
Alert
(pair+" "+TimeFrameToString(tf)+" Demand Zone Entered at "+DoubleToStr(price,Digits));
PlaySound(AlertSound);
DemAlert++;
}
}
it gives alert perfectly, i think this was due to the original coder has set the code to only alert once after the price hits a certain area. as with those additional condition sometimes price needs to pierce deeper into the S/R Area hence it won't alert again since the designed area has passed once and will not be alerted again?
How can we fix this so it could give alert as i wanted to. May God bless any Hero with unlimited amount of Goodness who could give a hand helping me fixing my dream indicator. thanks in advance!
Attached File(s)
II_SupDem_v2.32.mq4
62 KB
|
189 downloads