π°️ RADAR FX - MA TREND ALERT
STABLE VERSION
π΄π΄π΄π΄π΄
π°️RADAR FX v14.26
MQL5
//+------------------------------------------------------------------+
//|Radar Fx.mq5 |
//|Copyright 2026, Musafir Jambi |
//|Version 14.26 - Compact Left |
//+------------------------------------------------------------------+
#property copyright "Musafir Jambi"
#property version "14.26"
#property indicator_chart_window
#property indicator_plots 0
enum ENUM_MOD { M_M15=0, M_M5=1, M_H1=2, M_H4=3, M_D1=4 };
input group "SETTINGS"
input ENUM_MOD Mode = M_M15;
input bool Enable_Alert_R1 = true;
input bool Enable_Alert_R2 = true;
input group "------------------------------------------------------"
input string Kalimat_Satu = "Tuan Gerald Appel";
input string Kalimat_Dua = "Tuan Donald Lambert";
input string Kalimat_Tiga = "Tuan J. Welles Wilder Jr";
datetime ExpiryDate = D'2026.03.01 23:59';
datetime lastR1=0, lastR2=0;
int hM[3], hC[3], hA[3];
ENUM_TIMEFRAMES tfs[3];
color Up=clrBlue, Dn=clrRed, Wk=clrOrange, Sq=clrAqua;
int OnInit(){
if(Mode==M_M15){ tfs[0]=PERIOD_M15; tfs[1]=PERIOD_H1; tfs[2]=PERIOD_H4; }
else if(Mode==M_M5){ tfs[0]=PERIOD_M5; tfs[1]=PERIOD_H1; tfs[2]=PERIOD_H4; }
else if(Mode==M_H1){ tfs[0]=PERIOD_H1; tfs[1]=PERIOD_H4; tfs[2]=PERIOD_D1; }
else if(Mode==M_H4){ tfs[0]=PERIOD_H4; tfs[1]=PERIOD_D1; tfs[2]=PERIOD_W1; }
else { tfs[0]=PERIOD_D1; tfs[1]=PERIOD_W1; tfs[2]=PERIOD_MN1; }
for(int i=0; i<3; i++){
hM[i]=iMACD(_Symbol,tfs[i],12,26,1,PRICE_CLOSE);
hC[i]=iCCI(_Symbol,tfs[i],20,PRICE_TYPICAL);
hA[i]=iADX(_Symbol,tfs[i],14); }
EventSetMillisecondTimer(500);
return(INIT_SUCCEEDED); }
void OnDeinit(const int r){
EventKillTimer();
ObjectsDeleteAll(0,"R_"); }
int OnCalculate(const int rates_total,const int prev_calculated,const datetime &time[],const double &open[],const double &high[],const double &low[],const double &close[],const long &tick_volume[],const long &volume[],const int &spread[]){
Update();
return(rates_total); }
void OnTimer(){
Update();
ChartRedraw(); }
void Update(){
if(TimeCurrent() >= ExpiryDate){
ObjectsDeleteAll(0, "R_");
Draw("R_MSG", 20, 70, "EXPIRED", clrRed, 11, ANCHOR_LEFT, "Arial Bold");
return; }
double m[3][2], c[3][2], a[3];
bool mU[3], cU[3], blk=(((GetTickCount()/500)%2)==0);
datetime curB = iTime(_Symbol,_Period,0);
for(int i=0; i<3; i++){
double tm[2], tc[2], ta[1];
if(CopyBuffer(hM[i],0,0,2,tm)<2 || CopyBuffer(hC[i],0,0,2,tc)<2 || CopyBuffer(hA[i],0,0,1,ta)<1) continue;
m[i][0]=tm[0]; m[i][1]=tm[1]; c[i][0]=tc[0]; c[i][1]=tc[1]; a[i]=ta[0];
mU[i]=(m[i][1]>m[i][0]); cU[i]=(c[i][1]>c[i][0]); }
bool star1Weak=(a[0]<25), star2Weak=(a[1]<25);
bool powerCancel=(star1Weak && star2Weak);
bool r1Up = (mU[1] && cU[1] && mU[2] && !powerCancel);
bool r1Dn = (!mU[1] && !cU[1] && !mU[2] && !powerCancel);
bool r2Up = (mU[0] && cU[0] && mU[1] && cU[1] && mU[2] && !powerCancel);
bool r2Dn = (!mU[0] && !cU[0] && !mU[1] && !cU[1] && !mU[2] && !powerCancel);
if(curB!=lastR1 && (r1Up || r1Dn) && !r2Up && !r2Dn){
if(Enable_Alert_R1){ Alert("Radar Fx: R1 Sync (3 Arrows)"); lastR1=curB; }}
if(curB!=lastR2 && (r2Up || r2Dn)){
if(Enable_Alert_R2){ Alert("Radar Fx: R2 AQUA ENTRY (5 Arrows)!"); lastR2=curB; }}
for(int i=0; i<3; i++){
color colM=(m[i][1]>0?(mU[i]?Up:Wk):(!mU[i]?Dn:Wk));
color colC=(c[i][1]>100?Up:(c[i][1]<-100?Dn:Wk));
color colA=(a[i]<25?Wk:(a[i]<=40?Up:Dn));
bool blinkM=false, blinkC=false;
if(r2Up || r2Dn){
if(i==0 || i==1){ colM=Sq; colC=Sq; blinkM=true; blinkC=true; }
if(i==2){ colM=Sq; blinkM=true; }}
else if(r1Up || r1Dn){
if(i==1){ blinkM=true; blinkC=true; }
if(i==2){ blinkM=true; }}
int y=40+((2-i)*28), startX=35;
Draw("R_M"+(string)i, startX, y, (mU[i]?"▲":"▼"), (blinkM && blk ? clrWhite : colM), 14, ANCHOR_CENTER, "Arial Bold");
Draw("R_C"+(string)i, startX + 25, y, (cU[i]?"▲":"▼"), (blinkC && blk ? clrWhite : colC), 14, ANCHOR_CENTER, "Arial Bold");
Draw("R_A"+(string)i, startX + 50, y + 4, "★", (a[i]<25 && blk ? clrWhite : colA), 16, ANCHOR_CENTER, "Arial Bold"); } }
void Draw(string n, int x, int y, string t, color c, int s, ENUM_ANCHOR_POINT a, string f){
if(ObjectFind(0,n)<0) ObjectCreate(0,n,OBJ_LABEL,0,0,0);
ObjectSetInteger(0,n,OBJPROP_XDISTANCE,x);
ObjectSetInteger(0,n,OBJPROP_YDISTANCE,y);
ObjectSetInteger(0,n,OBJPROP_CORNER,CORNER_LEFT_LOWER);
ObjectSetInteger(0,n,OBJPROP_ANCHOR,a);
ObjectSetString(0,n,OBJPROP_TEXT,t);
ObjectSetInteger(0,n,OBJPROP_COLOR,c);
ObjectSetString(0,n,OBJPROP_FONT,f);
ObjectSetInteger(0,n,OBJPROP_FONTSIZE,s);
ObjectSetInteger(0,n,OBJPROP_SELECTABLE,false); }
π°️ RADAR FX - V14.37
mq5
//+------------------------------------------------------------------+
//| Radar Fx.mq5 |
//| Copyright 2026, Musafir Jambi |
//| Version 14.37 - Perfect Logic|
//+------------------------------------------------------------------+
#property copyright "Musafir Jambi"
#property version "14.37"
#property indicator_chart_window
#property indicator_plots 0
enum ENUM_POS { P_LEFT=0, P_RIGHT=1 };
enum ENUM_MOD { M_M15=0, M_M5=1, M_H1=2, M_H4=3, M_D1=4 };
input group "DISPLAY SETTINGS"
input ENUM_POS Dashboard_Position = P_LEFT;
input group "STRATEGY SETTINGS"
input ENUM_MOD Mode = M_M15;
input bool Enable_Alert_R1 = true;
input bool Enable_Alert_R2 = true;
input bool Enable_Alert_R3 = true;
input group "------------------------------------------------------"
input string Kalimat_Satu = "Tuan Gerald Appel";
input string Kalimat_Dua = "Tuan Donald Lambert";
input string Kalimat_Tiga = "Tuan J. Welles Wilder Jr";
datetime ExpiryDate = D'2026.03.01 23:59';
datetime lastR1=0, lastR2=0, lastR3=0;
int hM[3], hC[3], hA[3];
ENUM_TIMEFRAMES tfs[3];
color Up=clrBlue, Dn=clrRed, Wk=clrOrange, Sq=clrAqua;
int OnInit(){
if(Mode==M_M15){ tfs[0]=PERIOD_M15; tfs[1]=PERIOD_H1; tfs[2]=PERIOD_H4; }
else if(Mode==M_M5){ tfs[0]=PERIOD_M5; tfs[1]=PERIOD_H1; tfs[2]=PERIOD_H4; }
else if(Mode==M_H1){ tfs[0]=PERIOD_H1; tfs[1]=PERIOD_H4; tfs[2]=PERIOD_D1; }
else if(Mode==M_H4){ tfs[0]=PERIOD_H4; tfs[1]=PERIOD_D1; tfs[2]=PERIOD_W1; }
else { tfs[0]=PERIOD_D1; tfs[1]=PERIOD_W1; tfs[2]=PERIOD_MN1; }
for(int i=0; i<3; i++){
hM[i]=iMACD(_Symbol,tfs[i],12,26,1,PRICE_CLOSE);
hC[i]=iCCI(_Symbol,tfs[i],20,PRICE_TYPICAL);
hA[i]=iADX(_Symbol,tfs[i],14); }
EventSetMillisecondTimer(500);
return(INIT_SUCCEEDED); }
void OnDeinit(const int r){ EventKillTimer(); ObjectsDeleteAll(0,"R_"); }
int OnCalculate(const int r_t,const int p_c,const datetime &time[],const double &o[],const double &h[],const double &l[],const double &c[],const long &t_v[],const long &v[],const int &s[]){
Update(); return(r_t); }
void OnTimer(){ Update(); ChartRedraw(); }
void Update(){
if(TimeCurrent() >= ExpiryDate){ ObjectsDeleteAll(0, "R_"); return; }
double m[3][2], c[3][2], a[3];
bool mU[3], cU[3], blk=(((GetTickCount()/500)%2)==0);
datetime curB = iTime(_Symbol,_Period,0);
for(int i=0; i<3; i++){
double tm[2], tc[2], ta[1];
if(CopyBuffer(hM[i],0,0,2,tm)<2 || CopyBuffer(hC[i],0,0,2,tc)<2 || CopyBuffer(hA[i],0,0,1,ta)<1) continue;
m[i][0]=tm[0]; m[i][1]=tm[1]; c[i][0]=tc[0]; c[i][1]=tc[1]; a[i]=ta[0];
mU[i]=(m[i][1]>m[i][0]); cU[i]=(c[i][1]>c[i][0]); }
// --- FILTER: OFF JIKA TF1 DAN TF2 DUA-DUANYA ORANGE ---
bool powerOff = (a[0]<25 && a[1]<25);
// --- LOGIKA LEVEL SINKRONISASI ---
bool r1 = (!powerOff && mU[1]==cU[1]); // MACD TF2 + CCI TF2
bool r2 = (r1 && mU[0]==cU[0] && mU[0]==mU[1]); // + MACD TF1 + CCI TF1 searah
bool cciStrong = (MathAbs(c[0][1]) > 100);
bool r3 = (r2 && cciStrong); // + CCI TF1 Strong
if(!powerOff){
if(curB!=lastR3 && r3){ if(Enable_Alert_R3){ Alert("Radar Fx: R3 AQUA STRONG!"); lastR3=curB; }}
else if(curB!=lastR2 && r2 && !r3){ if(Enable_Alert_R2){ Alert("Radar Fx: R2 SYNC (4 Indicators)"); lastR2=curB; }}
else if(curB!=lastR1 && r1 && !r2){ if(Enable_Alert_R1){ Alert("Radar Fx: R1 SYNC (TF2)"); lastR1=curB; }}}
ENUM_BASE_CORNER crn = (Dashboard_Position==P_LEFT ? CORNER_LEFT_LOWER : CORNER_RIGHT_LOWER);
for(int i=0; i<3; i++){
color colM=(m[i][1]>0?(mU[i]?Up:Wk):(!mU[i]?Dn:Wk));
bool bM=false;
if(!powerOff){
if(r3){ if(i==0 || i==1){ colM=Sq; bM=true; }}
else if(r2){ if(i==0 || i==1){ bM=true; }}
else if(r1){ if(i==1){ bM=true; }}}
int y=40+((2-i)*28), startX=35;
Draw("R_M"+(string)i, startX, y, (mU[i]?"▲":"▼"), (bM && blk ? clrWhite : colM), 14, ANCHOR_CENTER, crn); }}
void Draw(string n, int x, int y, string t, color c, int s, ENUM_ANCHOR_POINT a, ENUM_BASE_CORNER crn){
if(ObjectFind(0,n)<0) ObjectCreate(0,n,OBJ_LABEL,0,0,0);
ObjectSetInteger(0,n,OBJPROP_XDISTANCE,x);
ObjectSetInteger(0,n,OBJPROP_YDISTANCE,y);
ObjectSetInteger(0,n,OBJPROP_CORNER,crn);
ObjectSetInteger(0,n,OBJPROP_ANCHOR,a);
ObjectSetString(0,n,OBJPROP_TEXT,t);
ObjectSetInteger(0,n,OBJPROP_COLOR,c);
ObjectSetString(0,n,OBJPROP_FONT,"Arial Bold");
ObjectSetInteger(0,n,OBJPROP_FONTSIZE,s);
ObjectSetInteger(0,n,OBJPROP_SELECTABLE,false); }
π΄Indikator Rdadar Fx
- Indikator MACD Histogram 12 26 1 , Strong UP/Down=Blue/Red, Weak=Orarange
- CCI Periode 20, Strong UP/Down=Blue/Red, Weak=Orarange
- Adx Periode 14 dengan arrow Bintang Adx<25 Orange, Adx>25 Blue, Adx >40 Red
Logika Alert:
- MACD TF2 Strong, CCI TF2 dan MACD TF3 searah, alert bunyi 1 kali, ketiga panah berkedip sampai singkron berakhir,
- R2=MACD TF2, CCI TF2, MACD, TF1, searah, alert bunyi 1 kali, ketiga panah berkedip sampai singkron berakhir
- Jika bintang Orange berkedi di TF1 dan TF2 semua alert di offkan dan tidak ada panah yang berkedip
Time Frame Mode:
Mode
- M5=TF1 M5, TF2 H1, TF3 H4
- M15=TF1 M15, TF2 H1, TF3 H4
- H1=TF1 H1, TF2 H4, TF3 Dayli
- H4=TF1 H4, TF2 Dayli, TF3 Weekly
- Dayli= TF1 Dayli, TF2 Weekly, TF3 Mountly
π°️ RADAR FX - V14.43
MQL5
//+------------------------------------------------------------------+
//| Radar Fx.mq5 |
//| Copyright 2026, Musafir Jambi |
//| Version 14.43 - Ultra Compact|
//+------------------------------------------------------------------+
#property copyright "Musafir Jambi"
#property version "14.43"
#property indicator_chart_window
#property indicator_plots 0
enum ENUM_POS { P_LEFT=0, P_RIGHT=1 };
enum ENUM_MOD { M_M15=0, M_M5=1, M_H1=2, M_H4=3, M_D1=4 };
input group "DISPLAY SETTINGS"
input ENUM_POS Dashboard_Position = P_LEFT;
input group "STRATEGY SETTINGS"
input ENUM_MOD Mode = M_M15;
input bool Enable_Alert_R1 = true;
input bool Enable_Alert_R2 = true;
input bool Enable_Alert_R3 = true;
input bool Enable_Alert_R4 = true;
datetime ExpiryDate = D'2026.03.01 23:59';
datetime lastR1=0, lastR2=0, lastR3=0, lastR4=0;
int hM[3], hC[3], hA[3];
ENUM_TIMEFRAMES tfs[3];
color Up=clrBlue, Dn=clrRed, Wk=clrOrange, Sq=clrAqua, Gr=clrLime;
int OnInit(){
if(Mode==M_M15){ tfs[0]=PERIOD_M15; tfs[1]=PERIOD_H1; tfs[2]=PERIOD_H4; }
else if(Mode==M_M5){ tfs[0]=PERIOD_M5; tfs[1]=PERIOD_H1; tfs[2]=PERIOD_H4; }
else if(Mode==M_H1){ tfs[0]=PERIOD_H1; tfs[1]=PERIOD_H4; tfs[2]=PERIOD_D1; }
else if(Mode==M_H4){ tfs[0]=PERIOD_H4; tfs[1]=PERIOD_D1; tfs[2]=PERIOD_W1; }
else { tfs[0]=PERIOD_D1; tfs[1]=PERIOD_W1; tfs[2]=PERIOD_MN1; }
for(int i=0; i<3; i++){
hM[i]=iMACD(_Symbol,tfs[i],12,26,1,PRICE_CLOSE);
hC[i]=iCCI(_Symbol,tfs[i],20,PRICE_TYPICAL);
hA[i]=iADX(_Symbol,tfs[i],14); }
EventSetMillisecondTimer(500);
return(INIT_SUCCEEDED); }
void OnDeinit(const int r){ EventKillTimer(); ObjectsDeleteAll(0,"R_"); }
int OnCalculate(const int r_t,const int p_c,const datetime &time[],const double &o[],const double &h[],const double &l[],const double &c[],const long &t_v[],const long &v[],const int &s[]){
Update(); return(r_t); }
void OnTimer(){ Update(); ChartRedraw(); }
void Update(){
if(TimeCurrent() >= ExpiryDate){ ObjectsDeleteAll(0, "R_"); return; }
double m[3][2], c[3][2], a[3];
bool mU[3], blk=(((GetTickCount()/500)%2)==0);
datetime curB = iTime(_Symbol,_Period,0);
for(int i=0; i<3; i++){
double tm[2], tc[2], ta[1];
if(CopyBuffer(hM[i],0,0,2,tm)<2 || CopyBuffer(hC[i],0,0,2,tc)<2 || CopyBuffer(hA[i],0,0,1,ta)<1){ continue; }
m[i][0]=tm[0]; m[i][1]=tm[1]; c[i][0]=tc[0]; c[i][1]=tc[1]; a[i]=ta[0];
mU[i]=(m[i][1]>m[i][0]); }
bool powerOff = (a[0]<25 && a[1]<25);
bool r1 = (!powerOff && mU[1] == (c[1][1] > c[1][0]));
bool r2 = (r1 && mU[1] == mU[0]);
bool cci0Strong = (MathAbs(c[0][1]) > 100);
bool r3 = (r2 && cci0Strong && mU[0] == (c[0][1] > c[0][0]));
bool r4 = (mU[2] == (c[2][1] > c[2][0]));
if(!powerOff){
if(curB!=lastR3 && r3){ if(Enable_Alert_R3) Alert("Radar Fx: R3 AQUA!"); lastR3=curB; }
else if(curB!=lastR2 && r2 && !r3){ if(Enable_Alert_R2) Alert("Radar Fx: R2 GREEN!"); lastR2=curB; }
else if(curB!=lastR1 && r1 && !r2){ if(Enable_Alert_R1) Alert("Radar Fx: R1 SYNC!"); lastR1=curB; }}
if(curB!=lastR4 && r4){ if(Enable_Alert_R4) Alert("Radar Fx: R4 TF3 SYNC!"); lastR4=curB; }
ENUM_BASE_CORNER crn = (Dashboard_Position==P_LEFT ? CORNER_LEFT_LOWER : CORNER_RIGHT_LOWER);
for(int i=0; i<3; i++){
if(i==0){ if(ObjectFind(0,"R_M0")>=0) ObjectDelete(0,"R_M0"); continue; }
color colM=(m[i][1]>0?(mU[i]?Up:Wk):(!mU[i]?Dn:Wk));
bool bM=false; int fontSize = 14;
if(!powerOff){
if(i==1){ fontSize = 22;
if(r3){ colM=Sq; bM=true; }
else if(r2){ colM=Gr; bM=true; }
else if(r1){ bM=true; }}
if(i==2 && r4){ bM=true; }}
int y=40+((2-i)*28), startX=35;
Draw("R_M"+(string)i, startX, y, (mU[i]?"▲":"▼"), (bM && blk ? clrWhite : colM), fontSize, ANCHOR_CENTER, crn); }}
void Draw(string n, int x, int y, string t, color c, int s, ENUM_ANCHOR_POINT a, ENUM_BASE_CORNER crn){
if(ObjectFind(0,n)<0){ ObjectCreate(0,n,OBJ_LABEL,0,0,0); }
ObjectSetInteger(0,n,OBJPROP_XDISTANCE,x);
ObjectSetInteger(0,n,OBJPROP_YDISTANCE,y);
ObjectSetInteger(0,n,OBJPROP_CORNER,crn);
ObjectSetInteger(0,n,OBJPROP_ANCHOR,a);
ObjectSetString(0,n,OBJPROP_TEXT,t);
ObjectSetInteger(0,n,OBJPROP_COLOR,c);
ObjectSetString(0,n,OBJPROP_FONT,"Arial Bold");
ObjectSetInteger(0,n,OBJPROP_FONTSIZE,s);
ObjectSetInteger(0,n,OBJPROP_SELECTABLE,false); }
Moving average 20 Multi tmeframe
tambahkan indikator adx padanya
Adx Periode 14 Adx<25 warna panah Orange, Adx>25 warna panah Standard
Jika TF1 danTF2 Adx<25 panah TF1 berwarna Ungu
jika TF1 dan T2 tidak satu arah, panah TF1 berwarna black
Logika Alert,
- R1=MACD TF2 dan CCI TF2 satu arah, panah MACD TF2 berkedip sampai singkron berakir
- R2= MACD TF2, CCI TF2, MACD TF1 satu arah, Maka panah MACD TF2 Maka warna panah MACD TF2 berubah menjadi Green dan berkedip sampai singkron berakir
- R3= MACD TF2, CCI TF2, MACD TF1 dan CCI TF1 Strong satu arah, Maka panah MACD TF2 berubah warna menjadi Aqua dan berkedip sampai singkron berakhir
- R4=MACD TF3 dan CCI TF3 satu arah Maka berkediplah panah MACD TF3 sampai singkron berakhir
- Jika bintang Orange berkedi di TF1 dan TF2 semua panah yang berkedip di hentikan
Time Frame Mode:
Mode
- M5=TF1 M5, TF2 H1, TF3 H4
- M15=TF1 M15, TF2 H1, TF3 H4
- H1=TF1 H1, TF2 H4, TF3 Dayli
- H4=TF1 H4, TF2 Dayli, TF3 Weekly
- Dayli= TF1 Dayli, TF2 Weekly, TF3 Mountly
π°️ MA_Ultimate_MTF_V22.mq5
MQL5
//+------------------------------------------------------------------+
//| MA_Ultimate_MTF_V22.mq5 |
//+------------------------------------------------------------------+
#property copyright "Gemini AI"
#property indicator_chart_window
#property indicator_buffers 2
#property indicator_plots 1
#property indicator_label1 "MA MTF"
#property indicator_type1 DRAW_COLOR_LINE
#property indicator_color1 clrDodgerBlue, clrRed
#property indicator_width1 2
enum ENUM_MODE_SET
{M5 = 1,
M15 = 2,
H1 = 3,
H4 = 4,
Daily = 5 };
input group "=== SETTING ==="
input ENUM_MODE_SET InpModeTF = M5; // Time frame mode
input group "=== PARAMETER MA & ADX ==="
input int InpMAPeriod = 20;
input ENUM_MA_METHOD InpMAMethod = MODE_LWMA;
input int InpADXPeriod = 14;
input group "=== VISUAL & ALERT ==="
input int InpArrowGap = 15;
input bool AlertOn = true;
double MABuffer[], ColorBuffer[];
int h_ma1, h_ma2, h_ma3, h_adx1, h_adx2;
ENUM_TIMEFRAMES tf1, tf2, tf3;
//+------------------------------------------------------------------+
int OnInit() {SetIndexBuffer(0, MABuffer, INDICATOR_DATA);
SetIndexBuffer(1, ColorBuffer, INDICATOR_COLOR_INDEX);
switch(InpModeTF)
{case M5: tf1=PERIOD_M5; tf2=PERIOD_H1; tf3=PERIOD_H4; break;
case M15: tf1=PERIOD_M15; tf2=PERIOD_H1; tf3=PERIOD_H4; break;
case H1: tf1=PERIOD_H1; tf2=PERIOD_H4; tf3=PERIOD_D1; break;
case H4: tf1=PERIOD_H4; tf2=PERIOD_D1; tf3=PERIOD_W1; break;
case Daily: tf1=PERIOD_D1; tf2=PERIOD_W1; tf3=PERIOD_MN1; break;
default: tf1=_Period; tf2=PERIOD_H1; tf3=PERIOD_H4; break;}
h_ma1 = iMA(_Symbol, tf1, InpMAPeriod, 0, InpMAMethod, PRICE_CLOSE);
h_ma2 = iMA(_Symbol, tf2, InpMAPeriod, 0, InpMAMethod, PRICE_CLOSE);
h_ma3 = iMA(_Symbol, tf3, InpMAPeriod, 0, InpMAMethod, PRICE_CLOSE);
h_adx1 = iADX(_Symbol, tf1, InpADXPeriod);
h_adx2 = iADX(_Symbol, tf2, InpADXPeriod);
return(INIT_SUCCEEDED);}
//+------------------------------------------------------------------+
void OnDeinit(const int reason) {ObjectsDeleteAll(0, "MA_SIG_"); }
//+------------------------------------------------------------------+
int OnCalculate(const int rates_total, const int prev_calculated, const datetime &time[],
const double &open[], const double &high[], const double &low[],
const double &close[], const long &tick_volume[], const long &volume[],
const int &spread[]) {
if(rates_total < 2) return(0);
int limit = (prev_calculated > 0) ? prev_calculated - 1 : 0;
for(int i = limit; i < rates_total; i++) {
double m1[2], m2[2], m3[2], a1[1], a2[1];
if(CopyBuffer(h_ma1, 0, time[i], 2, m1) < 2) {
if(i > 0) {
MABuffer[i] = MABuffer[i-1];
ColorBuffer[i] = ColorBuffer[i-1];
}
continue;}
MABuffer[i] = m1[1];
ColorBuffer[i] = (m1[1] > m1[0]) ? 0 : 1;
if(i == rates_total - 1 && i > 0 && ColorBuffer[i] != ColorBuffer[i-1]) {
ObjectsDeleteAll(0, "MA_SIG_");
if(CopyBuffer(h_ma2, 0, time[i], 2, m2) < 2 || CopyBuffer(h_ma3, 0, time[i], 2, m3) < 2) continue;
CopyBuffer(h_adx1, 0, time[i], 1, a1);
CopyBuffer(h_adx2, 0, time[i], 1, a2);
bool isUp = (ColorBuffer[i] == 0);
string name = "MA_SIG_" + (string)((int)time[i]);
double price = isUp ? (m1[1] - InpArrowGap*_Point) : (m1[1] + InpArrowGap*_Point);
if(price > 0 && ObjectCreate(0, name, OBJ_ARROW, 0, time[i], price)) {
ObjectSetInteger(0, name, OBJPROP_ARROWCODE, isUp ? 233 : 234);
color clr = isUp ? clrBlue : clrRed;
bool align = (isUp == (m2[1] > m2[0])) && (isUp == (m3[1] > m3[0]));
if(!align) clr = clrBlack;
else if(a1[0] < 25 && a2[0] < 25) clr = clrPurple;
else if(a1[0] < 25) clr = clrOrange;
ObjectSetInteger(0, name, OBJPROP_COLOR, clr);
ObjectSetInteger(0, name, OBJPROP_WIDTH, 2);
ObjectSetInteger(0, name, OBJPROP_ANCHOR, isUp ? ANCHOR_TOP : ANCHOR_BOTTOM);
if(AlertOn) Alert("Signal " + _Symbol);}}}
return(rates_total);}MA Ultimate MTF V22
tampa dasboard panah ada di garis MA20
logika Alert
- Garis Ma20 dua warna Blue and red up/down
- Moving average satu panah, jika panah baru muncul panah lama hilang
- Adx Periode 14 Adx<25 warna panah Orange, Adx>25 warna panah Standard
- Jika TF1 danTF2 Adx<25 panah TF1 berwarna Ungu
- jika TF1 dan T2 tidak satu arah, panah TF1 berwarna black
tambahkan
Time Frame Mode:
Mode
- M5=TF1 M5, TF2 H1, TF3 H4
- M15=TF1 M15, TF2 H1, TF3 H4
- H1=TF1 H1, TF2 H4, TF3 Dayli
- H4=TF1 H4, TF2 Dayli, TF3 Weekly
- Dayli= TF1 Dayli, TF2 Weekly, TF3 Mountly