TheChalleger's Journal - My Trading Journey 467 replies
DU23 Journal of a journey? 18 replies
zulemara's trade journal...A "magical" journey to wealth 6 replies
Mikali’s Journal – My Trading Journey Using the James16 Methodology 15 replies
MY Journey's Journal 11 replies
//+------------------------------------------------------------------+ //| scannerRockyPoint.mq4 | //| SnoopyAKQJT MMXVII | //+------------------------------------------------------------------+ // This program paints a grey dash if the candle is inside the kumo // The bar turns red when it is below the kumo, and green when above // If kumo breakout is detected while the the awesome oscillator > 0, // an alert will sound // #property copyright "Snoopy AQJT MMXVII" #property link "https://www.mql5.com" #property version "1.00" #property strict #property indicator_chart_window #property indicator_chart_window int dist_X, dist_Y, i, j; extern int Tenkan=9; // period of Tenkan-sen extern int Kijun=26; // period of Kijun-sen extern int Senkou=52; // period of Senkou Span B string Timeframe[] = {"M5", "M15", "M30", "H1", "H4", "D1"}; int TimeframeNo[] = {PERIOD_M5, PERIOD_M15, PERIOD_M30, PERIOD_H1, PERIOD_H4, PERIOD_D1}; string CurrPair[] = {"AUDCAD", "AUDCHF", "AUDJPY", "AUDNZD", "AUDUSD", "CADCHF", "CADJPY", "CHFJPY", "EURAUD", "EURCAD", "EURCHF", "EURGBP", "EURJPY", "EURNZD", "EURUSD", "GBPAUD", "GBPCAD", "GBPCHF", "GBPJPY", "GBPNZD", "GBPUSD", "NZDCAD", "NZDCHF", "NZDJPY", "NZDUSD", "USDCAD", "USDCHF", "USDJPY"}; color col; bool kumoBreakup, kumoBreakdown; bool AboveKumo, BelowKumo, InsideKumo; double awesome; //+------------------------------------------------------------------+ //| Custom indicator initialization function //+------------------------------------------------------------------+ int init() { //---- indicators //---- return(0); } //+------------------------------------------------------------------+ //| Custom indicator deinitialization function | //+------------------------------------------------------------------+ int deinit() { //---- ObjectsDeleteAll(); //---- return(0); } //+------------------------------------------------------------------+ //| Custom indicator iteration function | //+------------------------------------------------------------------+ int start() { static datetime Time0; //---- Timeframe Objects ---- dist_X = 80; for(i=0; i<=ArrayRange(Timeframe,0)-1; i++) { if (ObjectFind(Timeframe[i]+"txt") == -1) { ObjectCreate(Timeframe[i]+"txt", OBJ_LABEL, 0, 0, 0); ObjectSet(Timeframe[i]+"txt", OBJPROP_CORNER, 0); ObjectSet(Timeframe[i]+"txt", OBJPROP_XDISTANCE, dist_X); ObjectSet(Timeframe[i]+"txt", OBJPROP_YDISTANCE, 0); ObjectSetText(Timeframe[i]+"txt", Timeframe[i], 9, "Calibri", White); dist_X = dist_X+40; } } //---- Currency pairs objects ---- dist_Y = 30; for(i=0; i<=ArrayRange(CurrPair,0)-1; i++) { if (ObjectFind(CurrPair[i]+"txt") == -1) { ObjectCreate(CurrPair[i]+"txt", OBJ_LABEL, 0, 0, 0); ObjectSet(CurrPair[i]+"txt", OBJPROP_CORNER, 0); ObjectSet(CurrPair[i]+"txt", OBJPROP_XDISTANCE, 0); ObjectSet(CurrPair[i]+"txt", OBJPROP_YDISTANCE, dist_Y); ObjectSetText(CurrPair[i]+"txt", CurrPair[i], 9, "Calibri", White); dist_Y = dist_Y+17; } } //---- Dot matrix ---- dist_X=80; dist_Y=4; for(j=0; j<=ArrayRange(Timeframe,0)-1; j++) { for(i=0; i<=ArrayRange(CurrPair,0)-1; i++) { ObjectCreate(CurrPair[i]+Timeframe[j], OBJ_LABEL, 0, 0, 0); ObjectSet(CurrPair[i]+Timeframe[j], OBJPROP_CORNER, 0); ObjectSet(CurrPair[i]+Timeframe[j], OBJPROP_XDISTANCE, dist_X); ObjectSet(CurrPair[i]+Timeframe[j], OBJPROP_YDISTANCE, dist_Y); //-- Conditions -- kumoBreakup = false; kumoBreakdown = false; AboveKumo = false; BelowKumo = false; InsideKumo = false; double tenkanSen= iIchimoku(CurrPair[i],TimeframeNo[j],Tenkan,Kijun,Senkou,MODE_TENKANSEN,0); double KijunSen = iIchimoku(CurrPair[i],TimeframeNo[j],Tenkan,Kijun,Senkou,MODE_KIJUNSEN,0); double SenkouSpanA = iIchimoku(CurrPair[i], TimeframeNo[j], Tenkan, Kijun, Senkou, MODE_SENKOUSPANA, 0); double SenkouSpanB = iIchimoku(CurrPair[i], TimeframeNo[j], Tenkan, Kijun, Senkou, MODE_SENKOUSPANB, 0); double KumoTop= MathMax(SenkouSpanA, SenkouSpanB); double KumoBottom = MathMin(SenkouSpanA, SenkouSpanB); double High0 = iHigh(CurrPair[i],TimeframeNo[j],0); double Low0 = iLow(CurrPair[i],TimeframeNo[j],0); double High1 = iHigh(CurrPair[i],TimeframeNo[j],1); double Low1 = iLow(CurrPair[i],TimeframeNo[j],1); awesome = iAO(CurrPair[i],TimeframeNo[j],0); // Awesome Oscillator if((High0>KumoTop) && (Low0>KumoTop) && !(High1>KumoTop) && (Low1>KumoTop) && awesome>0 ) kumoBreakup=true; if((Low0<KumoBottom) && (High0<KumoBottom) && !(Low1<KumoBottom) && (High1<KumoBottom) && awesome>0 ) kumoBreakdown=true; if ((High0>KumoTop) && (Low0>KumoTop)) AboveKumo=true; if ((High0<KumoBottom) && (Low0<KumoBottom)) BelowKumo=true; if ((High0<KumoTop) && (Low0>KumoBottom)) InsideKumo=true; //-- Alerts -- col = Gray; //Time0 = Time[0]; if (kumoBreakup) { col=Lime; if (Time0 != Time[0]) { Alert(CurrPair[i]+" "+Timeframe[j]+" Kumo Breakup"); Time0 = Time[0]; } } else if (kumoBreakdown) { col=Red; if (Time0 != Time[0]) { Alert(CurrPair[i]+" "+Timeframe[j]+" Kumo Breakdown"); Time0 = Time[0]; } } else { col=Gray; } //-- Dot Matrix -- ObjectSetText(CurrPair[i]+Timeframe[j], "-", 35, "Calibri", col); if (AboveKumo) {ObjectSetText(CurrPair[i]+Timeframe[j], "-", 35, "Calibri", LimeGreen); } if (BelowKumo) {ObjectSetText(CurrPair[i]+Timeframe[j], "-", 35, "Calibri", Red); } if (InsideKumo) {ObjectSetText(CurrPair[i]+Timeframe[j], "-", 35, "Calibri", Gray); } dist_Y = dist_Y+17; } dist_Y=4; dist_X=dist_X+40; } WindowRedraw(); //---- return(0); } //+-------------------