//+------------------------------------------------------------------+ //| Ãîëóáûå ôèøêè TEST_BARS_GBPJPY_8v1_Low.mq4 | //+------------------------------------------------------------------+ //| Íåîáõîäèìà ïðîâåðêà ðàáîòû â ðàçíûõ ÄÖ = âîçìîæíî ñèíòåòèêà ìîæåò èçìåíÿòñÿ !!!!!!!!!!!!!!!!! //| Ýòîò èíäþê ïðè ïîìîùè ðàñêðàñêè ïîêàçûâàåò ðàçíèöó â êàæäîé èç 4 (÷åòûðåõ) //| ÷àñòåé ÍÈÆÍÅÉ ÏÎËÎÂÈÍÊÈ áàðà, ìåæäó ðàññ÷åòíûì è èñòèíûì ïîëîæåíèÿìè êðîññà GBPJPY //| èñïîëüçóþòñÿ 4 ñòàíäàðòíûõ èíäþêà ñ òåðìèíàëà = Momentum, WPR,RSI, Stochastic. //| Ïðè íàâåäåíèè ìûøêè í ëþáóþ èç ÷àñòåé áàðà, ïîëó÷èòå íåîáõîäèìóþ èíôîðìàöèþ !!! //+------------------------------------------------------------------+ #property indicator_chart_window #property indicator_buffers 8 #property indicator_color1 Red //Black #property indicator_color2 Blue//Black White #property indicator_color3 Red //Blue #property indicator_color4 Blue #property indicator_color5 Red //Black #property indicator_color6 Blue//Black White #property indicator_color7 Red //Blue #property indicator_color8 Blue //---- extern int ilimit = 555; extern int Period_Momentum = 7; extern int Period_WPR = 7; extern int Period_RSI = 7; extern int Period_SToh = 7; extern int Slowing = 3; //---- buffers double val1[],val2[],val3[],val4[]; double val11[],val22[],val33[],val44[]; //+------------------------------------------------------------------+ //| Custom indicator initialization function | //+------------------------------------------------------------------+ int init() { SetIndexStyle(0,DRAW_HISTOGRAM); SetIndexBuffer(0,val1); SetIndexDrawBegin(0,0); SetIndexStyle(1,DRAW_HISTOGRAM); SetIndexBuffer(1,val2); SetIndexDrawBegin(1,0); SetIndexStyle(2,DRAW_HISTOGRAM); SetIndexBuffer(2,val3); SetIndexDrawBegin(2,0); SetIndexStyle(3,DRAW_HISTOGRAM); SetIndexBuffer(3,val4); SetIndexDrawBegin(3,0); SetIndexLabel(0, "DIFFERENCE BETWEEN Momentum GBPJPY " );//ÐÀÇÍÈÖÀ ÌÅÆÄÓ Momentum GBPJPY SetIndexLabel(2, "DIFFERENCE BETWEEN WPR GBPJPY " ); //ÐÀÇÍÈÖÀ ÌÅÆÄÓ WPR GBPJPY SetIndexStyle(4,DRAW_HISTOGRAM); SetIndexBuffer(4,val11); SetIndexDrawBegin(4,0); SetIndexStyle(5,DRAW_HISTOGRAM); SetIndexBuffer(5,val22); SetIndexDrawBegin(5,0); SetIndexStyle(6,DRAW_HISTOGRAM); SetIndexBuffer(6,val33); SetIndexDrawBegin(6,0); SetIndexStyle(7,DRAW_HISTOGRAM); SetIndexBuffer(7,val44); SetIndexDrawBegin(7,0); SetIndexLabel(4, "DIFFERENCE BETWEEN SToh GBPJPY " ); SetIndexLabel(6, "DIFFERENCE BETWEEN RSI GBPJPY " ); return(0); } //+------------------------------------------------------------------+ int start() { { double r, rr, r1, rr1,r2, rr2, r3, rr3 ; int counted_bars = IndicatorCounted(); if(counted_bars > 0) counted_bars--; int limit = Bars - counted_bars; limit = ilimit; for(int i = limit; i >= 0 ; i--) { r= iMomentum("GBPJPY", 0, Period_Momentum,PRICE_CLOSE, i); rr= iMomentum("GBPUSD", 0, Period_Momentum,PRICE_CLOSE, i)*0.5 + iMomentum("USDJPY", 0, Period_Momentum,PRICE_CLOSE, i)*0.5; //+------------------------------------------------------------------+ r1= iWPR("GBPJPY", 0, Period_WPR, i); rr1= iWPR("GBPUSD", 0, Period_WPR, i)*0.5 + iWPR("USDJPY", 0, Period_WPR, i)*0.5; //+------------------------------------------------------------------+ r2= iStochastic("GBPJPY", 0, Period_SToh,3,Slowing, MODE_SMA, NULL, MODE_MAIN, i); // EURJPY rr2=iStochastic("GBPUSD", 0, Period_SToh,3,Slowing, MODE_SMA, NULL, MODE_MAIN, i)*0.5 +iStochastic("USDJPY", 0, Period_SToh,3,Slowing, MODE_SMA, NULL, MODE_MAIN, i)*0.5; //+------------------------------------------------------------------+ r3= iRSI("GBPJPY", 0, Period_RSI, PRICE_CLOSE, i); rr3=iRSI("GBPUSD", 0, Period_RSI, PRICE_CLOSE, i)*0.5 + iRSI("USDJPY", 0, Period_RSI , PRICE_CLOSE, i)*0.5; //+------------------------------ if (r> rr) { val1[i]= Low[i]+(High[i]-Low[i])*0.375; //âåðõíÿÿ ïåðâàÿ ÷åòâåðòü íèæíåé ïîëîâèíêè áàðà val2[i]=Low[i]+(High[i]-Low[i])*0.5; } if (rr>r) { val1[i]= Low[i]+(High[i]-Low[i])*0.5; val2[i]=Low[i]+(High[i]-Low[i])*0.375; } //+------------------------------ if (r1>rr1&& r1> -50) { val3[i]=Low[i]+(High[i]-Low[i])*0.25; //âåðõíÿÿ âòîðàÿ ÷åòâåðòü íèæíåé ïîëîâèíêè áàðà val4[i]=Low[i]+(High[i]-Low[i])*0.375; } if (rr1>r1 && r1< -50) // Íàéòè ðåøåíèå = Ïðîâåðèòü > èëè >= è ìîæåò äîáàâèòü r>=rr && r>=100 && rr>=100 ==??????????????? { val3[i]=Low[i]+(High[i]-Low[i])*0.375; val4[i]=Low[i]+(High[i]-Low[i])*0.25; } //+----------------------------------- if (r2>rr2) { val11[i]=Low[i]+(High[i]-Low[i])*0.125; val22[i]=Low[i]+(High[i]-Low[i])*0.25; //âåðõíÿÿ òðåòüÿ ÷åòâåðòü íèæíåé ïîëîâèíêè áàðà } if (rr2>r2) { val11[i]=Low[i]+(High[i]-Low[i])*0.25; val22[i]= Low[i]+(High[i]-Low[i])*0.125; } //+----------------------------------- if (r3>rr3) { val33[i]=Low[i]; val44[i]= Low[i]+(High[i]-Low[i])*0.125; //ñàìàÿ íèæíÿÿ ÷åòâåðòü íèæíåé ïîëîâèíêè áàðà } if (rr3>r3) { val33[i]=Low[i]+(High[i]-Low[i])*0.125; val44[i]= Low[i]; } } } return(0); } //+------------------------------------------------------------------+
Sample
Analysis
Market Information Used:
Series array that contains the highest prices of each bar
Series array that contains the lowest prices of each bar
Indicator Curves created:
Implements a curve of type DRAW_HISTOGRAM
Indicators Used:
Momentum indicator
Larry William percent range indicator
Stochastic oscillator
Relative strength index
Custom Indicators Used:
Order Management characteristics:
Other Features: