Metatrader Expert Advisor

Una guida per configurare un Server Virtuale per Metatrader 4.

Cosa spiega la guida? Quasi tutto quello che c'è da sapere (e da fare..) sui VPS, ossia:- Come acquistare il servizio e procedere al primo collegamento;- Come creare un collegamento sul desktop per l'avvio veloce del desktop virtuale;- Come configuare il VPS perchè ad ogni riavvio si riconnetta automaticamente con il vostro profilo utente;- Come configurare windows perchè ad ogni riavvio mandi in esecuzione la MT4 automaticamente;- Come pianificare dei riavvii periodici del VPS per limitare i danni di eventuali blocchi del sistema ( anche se lo chiamano Server si tratta pur sempre di Windows..);- Come disconnetersi dal proprio VPS in maniera sicura

Ecco una utile Guida da Scaricare Gratis!

Quali sono i vantaggi e svantaggi di servirsi di una server virtuale (VPS)?

Collegarsi in remoto è facile e possibile da qualunque sistema operativo (WIN, LINUX, MAC etc.) e ti da la possibilità di avere un vero e proprio computer in qualche parte del mondo, a cui ti colleghi esattamente come da un qualsiasi terminale in una rete intranet.

Il vantaggio è che il VPS non devi spegnerlo e quindi, MT4, EA eccetera saranno sempre operativi, 24/24. Inoltre, se il servizio è offerto dal Broker, si presuppone che il VPS sia abbastanza vicino ai server centrali dello stesso con conseguente velocizzazione delle operazioni in termini di ms.

Svantaggi

Lo svantaggio è che un VPS (acronimo che sta per Virtual Private Server) è una partizione di un PC condiviso da altri utenti per cui, se capitasse che uno di loro sovraccaricasse di lavoro la macchina, la cui CPU e la cui RAM sono in comune, oltre alla Banda (non la partizione di disco fisso, ovviamente), il successivo default interesserebbe tutti gli utenti insistenti su quella macchina. Questo è il motivo per cui i VPS hanno un costo limitato (anche ben al di sotto di 30 euro mensili, ce ne sono anche da meno di 15 $ al mese). Inoltre non credo che una volta aderito al servizio sia possibile lanciare sul VPS delle istanze di Metatrader diverse da quella offerta dal Broker (se prendo il VPS di un broker, dubito di poterlo utilizzare anche per un secondo broker...).

Server dedicato

La soluzione è quella di prendere per conto proprio un Server "Dedicato", un computer virtuale (chiamiamolo così per comodità) a cui connettersi previo abbonamento, con le stesse caratteristiche tecniche, ma la cui macchina "host" sia interamente utilizzata da te e non condivisa.Ovviamente costa di più, mediamente intorno ai 150$ mensili, tuttavia esistono in rete offerte anche di server "cloud" che adeguando le risorse all'effettivo utilizzo consentono di risparmiare anche parecchio, fino a azzerare le spese in caso di spegnimento della macchina in periodi in cui non serva utilizzarla, pur mantenendone la titolarità.

Leggi anche:

Forex Expert Advisor Expert Advisor - Trading Automatico Come caricare gli EA nella Piattaforma MT4 Come avviene la negoziazione sul forex Che funzione ha il forex? I vantaggi del Forex market rispetto altri mercati di negoziazione Il mercato Forex e alcune caratteristiche Indicatore Metatrader - Forex OFF Trend Free Metatrader Indicators

 

INDICATORE MT4//+------------------------------------------------------------------+ //| GannZIGZAG.mq4 | //| Copyright © 2005, MetaQuotes Software Corp. | //| http://www.metaquotes.net | //+------------------------------------------------------------------+ #property copyright "" #property link "" #property indicator_chart_window #property indicator_buffers 2 #property indicator_color1 DeepSkyBlue #property indicator_color2 Black //---- input parameters extern int GSv_range=2; //---- buffers double GSv_sl[]; double GSv_m[]; //---- bool draw_up=0,draw_dn=0,initfl=0; int fPoint_i,sPoint_i,s_up,s_dn,drawf,lb,idFile; double h,l; bool cur_h=0,cur_l=0; //+------------------------------------------------------------------+ //| Custom indicator initialization function | //+------------------------------------------------------------------+ int init() { //---- indicators SetIndexStyle(0,DRAW_SECTION,STYLE_DOT); //SetIndexStyle(1,DRAW_SECTION); SetIndexBuffer(0,GSv_sl); //SetIndexBuffer(1,GSv_m); SetIndexEmptyValue(0,0.0); //SetIndexEmptyValue(1,0.0); FileDelete("Gann.txt"); idFile=FileOpen("Gann.txt",FILE_READ|FILE_WRITE," "); //---- return(0); } //+------------------------------------------------------------------+ //+------------------------------------------------------------------+ //| Custom indicator iteration function | //+------------------------------------------------------------------+ int start() { int counted_bars=IndicatorCounted(); int cb,limit,i; //---- if( GSv_range<1 ) { Alert("Èíäèêàòîð ðàññ÷èòûâàåò çíà÷åíèÿ /n ïðè ïàðàìåòðå GSv_range íå ìåíüøå 1!!!"); return(-1); } if( counted_bars<0 ) { return(-1); } else { if( Bars-1-counted_bars<=0 ) { limit=0; } else { limit=Bars-1-counted_bars; } } //ïåðâîíà÷àëüíàÿ èíèöèàëèçàöèÿ if( initfl!=1 ) { myInit(); } //FileWrite(idFile," 0. Áàðîâ íà ãðàôèêå "+Bars); //öèêë ïî áàðàì for( cb=limit;cb>=0;cb--) { if( cb==0 ) FileWrite(idFile,"---- èíäåêñ òåêóùåãî áàðà "+cb+" "+(Bars-1-cb)+" âðåìÿ "+TimeToStr(Time[cb])+" áàðîâ íà ãðàôèêå "+Bars); //åñëè íà ïðåäûäóùåì áàðå áûë îòðèñîâàí ýêñòðåìóì if( GSv_sl[cb+1]>0 && lb!=Bars-1-cb ) { if( draw_up!=0 ) { s_dn=0; if( cb==0 ) FileWrite(idFile," 1. Áûë îòðèñîâàí ìàêñèìóì, ñ÷åò÷èê ìèíèìóìîâ îáíóëåí"); } else { if( draw_dn!=0 ) { s_up=0; if( cb==0 ) FileWrite(idFile," 2. Áûë îòðèñîâàí ìèíèìóì, ñ÷åò÷èê ìàêñèìóìîâ îáíóëåí"); } } } if( lb!=Bars-1-cb ) { cur_h=0; cur_l=0; if( cb==0 ) FileWrite(idFile," 2.1 íîâûé áàð ôëàãè íàëè÷èÿ ìàêñèìóìà è ìèíèìóìà ñáðîøåíû"); } if( cb>Bars-2-drawf || (High[cb]<=High[cb+1] && Low[cb]>=Low[cb+1]) ) { if( cb==0 ) FileWrite(idFile," 3. Áàð ëèáî 'âíóòðåííèé', ëèáî äî ïåðâîãî ýêñòðåìóìà"); continue; } if( draw_up!=0 ) { if( cb==0 ) FileWrite(idFile," 4. Èíäèêàòîð íàïðàâëåí ââåðõ"); //åñëè ëèíèÿ íàïðàâëåíà ââåðõ if( High[cb]>h ) { //åñëè äîñòèãíóò íîâûé ìàêñèìóì h=High[cb]; cur_h=1; if( cb==0 ) FileWrite(idFile," 5. Äîñòèãíóò íîâûé ìàêñèìóì = "+h+" cur_h "+cur_h); } if( Low[cb]<l ) { //åñëè äîñòèãíóò íîâûé ìèíèìóì l=Low[cb]; if( cb==0 ) FileWrite(idFile," 6. Äîñòèãíóò íîâûé ìèíèìóì = "+l); //åñëè ýòî íå òîò æå ñàìûé áàð if( lb!=Bars-1-cb || cur_l!=1 ) s_dn++; cur_l=1; if( cb==0 ) FileWrite(idFile," 7. Áàð íîâûé, ñ÷åò÷èê ìèíèìóìîâ óâåëè÷åí "+s_dn+" cur_l "+cur_l); } //åñëè ñ÷åò÷èêè ðàâíû if( s_up==s_dn ) { if( cb==0 ) FileWrite(idFile," 8. Ñ÷åò÷èêè ðàâíû"); //åñëè ïîñëåäíèé áàð îäíîâðåìåííî íîâûé ìàêñèìóì è ìèíèìóì if( cur_h==cur_l && cur_l==1 ) { if( cb==0 ) FileWrite(idFile," 9. Åñòü äâà ýêñòðåìóìà"); //åñëè ñâå÷à ìåäâåæüÿ if( Close[cb]<=Open[cb] ) { draw_up=0; draw_dn=1; fPoint_i=sPoint_i; sPoint_i=Bars-1-cb; GSv_sl[cb]=l; for( i=cb+1;i<Bars-1-fPoint_i;i++ ) { GSv_sl[i]=0; } if( cb==0 ) FileWrite(idFile," 10. Ñâå÷à ìåäâåæüÿ, ëèíèÿ ââåðõ = "+draw_up+", ëèíèÿ âíèç,"+draw_dn+" fPoint_i = "+fPoint_i+" sPoint_i "+sPoint_i+" èíäèêàòîð = "+GSv_sl[cb]); } else { //åñëè ñâå÷à áû÷üÿ sPoint_i=Bars-1-cb; GSv_sl[cb]=h; for( i=cb+1;i<Bars-1-fPoint_i;i++ ) { GSv_sl[i]=0; } if( cb==0 ) FileWrite(idFile," 11. Ñâå÷à áû÷üÿ, ëèíèÿ ââåðõ = "+draw_up+", ëèíèÿ âíèç,"+draw_dn+" fPoint_i = "+fPoint_i+" sPoint_i "+sPoint_i+" èíäèêàòîð = "+GSv_sl[cb]); } } else { //åñëè ïîñëåäíèé áàð òîëüêî íîâûé ìàêñèìóì if( cur_h==1 ) { sPoint_i=Bars-1-cb; GSv_sl[cb]=h; l=Low[cb]; for( i=cb+1;i<Bars-1-fPoint_i;i++ ) { GSv_sl[i]=0; } if( cb==0 ) FileWrite(idFile," 12. Òîëüêî ìàêñèìóì, èíäèêàòîð = "+GSv_sl[cb]+" sPoint_i "+sPoint_i+" l "+l); } else { if( cur_l==1 ) { //åñëè ïîñëåäíèé áàð òîëüêî íîâûé ìèíèìóì draw_up=0; draw_dn=1; fPoint_i=sPoint_i; sPoint_i=Bars-1-cb; GSv_sl[cb]=l; h=High[cb]; for( i=cb+1;i<Bars-1-fPoint_i;i++ ) { GSv_sl[i]=0; } if( cb==0 ) FileWrite(idFile," 13. Òîëüêî ìèíèìóì, èíäèêàòîð = "+GSv_sl[cb]+" fPoint_i "+fPoint_i+" sPoint_i "+sPoint_i+" draw_up "+draw_up+" draw_dn "+draw_dn+" h "+h); } } } } else { //èíà÷å åñëè ñìåíû íàïðàâëåíèÿ íåò ÿâíî (ñ÷åò÷èê Dn ñâå÷åé íå ðàâåí GSv_range) if( cb==0 ) FileWrite(idFile," 14. Ñ÷åò÷èêè íå ðàâíû"); //åñëè äîñòèãíóò íîâûé ìàêñèìóì if( cur_h==1 ) { sPoint_i=Bars-1-cb; GSv_sl[cb]=h; for( i=cb+1;i<Bars-1-fPoint_i;i++ ) { GSv_sl[i]=0; } l=Low[cb]; if( cb==0 ) FileWrite(idFile," 15. Åñòü íîâûé ìàêñèìóì, èíäèêàòîð "+GSv_sl[cb]+" sPoint_i "+sPoint_i+" l "+l); } } } else { //åñëè ëèíèÿ íàïðàâëåíà âíèç if( cb==0 ) FileWrite(idFile," 16. Èíäèêàòîð íàïðàâëåí âíèç"); if( High[cb]>h ) { //åñëè äîñòèãíóò íîâûé ìàêñèìóì h=High[cb]; if( cb==0 ) FileWrite(idFile," 17. Äîñòèãíóò íîâûé ìàêñèìóì "+h); if( lb!=Bars-1-cb || cur_h!=1 ) s_up++; cur_h=1; //åñëè ýòî íå òîò æå ñàìûé áàð if( cb==0 ) FileWrite(idFile," 18. Íîâûé áàð, ñ÷åò÷èê ìàêñèìóìîâ óâåëè÷åí "+s_up+" cur_h "+cur_h+" h "+h); } if( Low[cb]<l ) { //åñëè äîñòèãíóò íîâûé ìèíèìóì l=Low[cb]; cur_l=1; if( cb==0 ) FileWrite(idFile," 19. Äîñòèãíóò íîâûé ìèíèìóì "+l+" cur_l "+cur_l); } //åñëè ñ÷åò÷èêè ðàâíû if( s_up==s_dn ) { if( cb==0 ) FileWrite(idFile," 20. Ñ÷åò÷èêè ðàâíû"); //åñëè ïîñëåäíèé áàð îäíîâðåìåííî íîâûé ìàêñèìóì è ìèíèìóì if( cur_h==cur_l && cur_l==1 ) { if( cb==0 ) FileWrite(idFile," 21. Åñòü äâà ýêñòðåìóìà"); //åñëè ñâå÷à ìåäâåæüÿ if( Close[cb]<=Open[cb] ) { sPoint_i=Bars-1-cb; GSv_sl[cb]=l; for( i=cb+1;i<Bars-1-fPoint_i;i++ ) { GSv_sl[i]=0; } if( cb==0 ) FileWrite(idFile," 22. Ñâå÷à ìåäâåæüÿ, èíäèêàòîð "+GSv_sl[cb]+" sPoint_i "+sPoint_i); } else { //åñëè ñâå÷à áû÷üÿ draw_up=1; draw_dn=0; fPoint_i=sPoint_i; sPoint_i=Bars-1-cb; GSv_sl[cb]=h; for( i=cb+1;i<Bars-1-fPoint_i;i++ ) { GSv_sl[i]=0; } if( cb==0 ) FileWrite(idFile," 23. Ñâå÷à áû÷üÿ, èíäèêàòîð "+GSv_sl[cb]+" draw_up "+draw_up+" draw_dn "+draw_dn+" sPoint_i "+sPoint_i+" fPoint_i "+fPoint_i); } } else { //åñëè ïîñëåäíèé áàð òîëüêî íîâûé ìàêñèìóì if( cur_h==1 ) { draw_up=1; draw_dn=0; fPoint_i=sPoint_i; sPoint_i=Bars-1-cb; GSv_sl[cb]=h; l=Low[cb]; for( i=cb+1;i<Bars-1-fPoint_i;i++ ) { GSv_sl[i]=0; } if( cb==0 ) FileWrite(idFile," 24. Òîëüêî ìàêñèìóì, èíäèêàòîð "+GSv_sl[cb]+" draw_up "+draw_up+" draw_dn "+draw_dn+" sPoint_i "+sPoint_i+" fPoint_i "+fPoint_i+" l "+l); } else { if( cur_l==1 ) { //åñëè ïîñëåäíèé áàð òîëüêî íîâûé ìèíèìóì sPoint_i=Bars-1-cb; GSv_sl[cb]=l; h=High[cb]; for( i=cb+1;i<Bars-1-fPoint_i;i++ ) { GSv_sl[i]=0; } if( cb==0 ) FileWrite(idFile," 25. Òîëüêî ìèíèìóì, èíäèêàòîð "+GSv_sl[cb]+" sPoint_i "+sPoint_i+" h "+h); } } } } else { //èíà÷å åñëè ñìåíû íàïðàâëåíèÿ íåò ÿâíî (ñ÷åò÷èê Up ñâå÷åé íå ðàâåí GSv_range) if( cb==0 ) FileWrite(idFile," 26. Ñ÷åò÷èêè íå ðàâíû"); //åñëè äîñòèãíóò íîâûé ìèíèìóì if( cur_l==1 ) { sPoint_i=Bars-1-cb; GSv_sl[cb]=l; for( i=cb+1;i<Bars-1-fPoint_i;i++ ) { GSv_sl[i]=0; } h=High[cb]; if( cb==0 ) FileWrite(idFile," 27. Äîñòèãíóò íîâûé ìèíèìóì, èíäèêàòîð "+GSv_sl[cb]+" sPoint_i "+sPoint_i+" h "+h); } } } if( lb!=Bars-1-cb ) lb=Bars-1-cb; } //---- return(0); } //+------------------------------------------------------------------+ //+------------------------------------------------------------------+ //| Custor indicator deinitialization function | //+------------------------------------------------------------------+ int deinit() { //---- FileClose(idFile); //---- return(0); } //+------------------------------------------------------------------+ //+------------------------------------------------------------------+ // Ôóíêöèÿ íà÷àëüíîé èíèöèàëèçàöèè èíäèêàòîðà | //+------------------------------------------------------------------+ void myInit() { //---- int cb; fPoint_i=0; h=High[Bars-1]; l=Low[Bars-1]; for( cb=Bars-2;cb>=0;cb--) { if( High[cb]>High[cb+1] || Low[cb]<Low[cb+1] ) { if( High[cb]>h && High[cb]>High[cb+1] ) { s_up++; } if( Low[cb]<l && Low[cb]<Low[cb+1] ) { s_dn++; } } else { continue; } if( s_up==s_dn && s_up==GSv_range ) { h=High[cb]; l=Low[cb]; sPoint_i=Bars-1-cb; if( Close[cb]>=Open[cb] ) { s_dn=0; GSv_sl[Bars-1]=Low[Bars-1]; GSv_sl[cb]=High[cb]; draw_up=1; break; } else { s_up=0; GSv_sl[Bars-1]=High[Bars-1]; GSv_sl[cb]=Low[cb]; draw_dn=1; break; } } else { h=High[cb]; l=Low[cb]; sPoint_i=Bars-1-cb; if( s_up==GSv_range ) { s_dn=0; GSv_sl[Bars-1]=Low[Bars-1]; GSv_sl[cb]=High[cb]; draw_up=1; break; } else { if( s_dn==GSv_range ) { s_up=0; GSv_sl[Bars-1]=High[Bars-1]; GSv_sl[cb]=Low[cb]; draw_dn=1; break; } } } } initfl=1; drawf=sPoint_i; //---- return(0); } //+------------------------------------------------------------------+
Indicatore MetaTrader //+------------------------------------------------------------------+ //| SilverTrend .mq4 | //| SilverTrend rewritten by CrazyChart | //| http://viac.ru/ | //+------------------------------------------------------------------+ #property copyright "SilverTrend rewritten by CrazyChart" #property link "http://viac.ru/ " #property indicator_chart_window #property indicator_buffers 2 #property indicator_color1 Red #property indicator_color2 Blue //---- input parameters extern int CountBars=300; extern int SSP=7; extern double Kmin=1.6; extern double Kmax=50.6; //24 21.6 21.6 //---- buffers double ExtMapBuffer1[]; double ExtMapBuffer2[]; //+------------------------------------------------------------------+ //| Custom indicator initialization function | //+------------------------------------------------------------------+ int init() { //---- indicators IndicatorBuffers(2); SetIndexStyle(0,DRAW_LINE,0,2,Red); SetIndexBuffer(0,ExtMapBuffer1); SetIndexStyle(1,DRAW_LINE,0,2,Blue); SetIndexBuffer(1,ExtMapBuffer2); //---- return(0); } //+------------------------------------------------------------------+ //| Custor indicator deinitialization function | //+------------------------------------------------------------------+ int deinit() { return(0); } //+------------------------------------------------------------------+ //| Custom indicator iteration function | //+------------------------------------------------------------------+ int start() { if (CountBars>=Bars) CountBars=Bars; SetIndexDrawBegin(0,Bars-CountBars+SSP); SetIndexDrawBegin(1,Bars-CountBars+SSP); int i, i2,loopbegin,counted_bars=IndicatorCounted(); double SsMax, SsMin, K, val1, val2, smin, smax, price; if(Bars<=SSP+1) return(0); //---- initial zero //K=33-RISK; /* if (firstTime==true) { loopbegin = CountBars; if (loopbegin>(Bars-2*SSP+1)) loopbegin=Bars-2*SSP+1; firstTime=False; }; ðóäèìåíò ñòàðîé ïðîãðàììû */ if(Bars<=SSP+1) return(0); //---- initial zero //+++++++ if(counted_bars<SSP+1) { for(i=1;i<=SSP;i++) ExtMapBuffer1[CountBars-i]=0.0; for(i=1;i<=SSP;i++) ExtMapBuffer2[CountBars-i]=0.0; } //+++++++-SSP for(i=CountBars-SSP;i>=0;i--) { SsMax = High[Highest(NULL,0,MODE_HIGH,SSP,i-SSP+1)]; SsMin = Low[Lowest(NULL,0,MODE_LOW,SSP,i-SSP+1)]; smin = SsMin-(SsMax-SsMin)*Kmin/100; smax = SsMax-(SsMax-SsMin)*Kmax/100; ExtMapBuffer1[i-SSP+6]=smax; ExtMapBuffer2[i-SSP-1]=smax; val1 = ExtMapBuffer1[0]; val2 = ExtMapBuffer2[0]; if (val1 > val2) Comment("ïîêóïêà buy ",val1); if (val1 < val2) Comment("ïðîäàæà sell ",val2); } //---- return(0); } //+------------------------------------------------------------------+
Indicatore MetaTrader //+------------------------------------------------------------------+ //| Forex Freeway 2.mq4 | //| Copyright © 2006, Desoft | //| http://www.metatrader.org | //+------------------------------------------------------------------+ #property copyright "Copyright © 2006, DeSoft" #property indicator_chart_window extern int p1.ma=15;//Period() in minutes extern int p2.ma=30;//Period() in minutes extern int p3.ma=60;//Period() in minutes extern int p4.ma=240;//Period() in minutes extern int first_columnRSXperiods=14; extern int second_columnRSXperiods=14; extern int third_columnRSXperiods=14; extern int fourth_columnRSXperiods=14; extern int rsxUpperTrigger=0; extern int rsxLowerTrigger=0; extern bool Use_Std_Reg=false; extern int STD.Rgres.period=0; extern int STD.Rgres.length=56; extern double STD.Rgres.width=1.618; extern double STD.width=0.618; extern int ma.applied.price=1;/* Applied price constants. It can be any of the following values: Constant Value Description PRICE_CLOSE 0 Close price. PRICE_OPEN 1 Open price. PRICE_HIGH 2 High price. PRICE_LOW 3 Low price. PRICE_MEDIAN 4 Median price, (high+low)/2. PRICE_TYPICAL 5 Typical price, (high+low+close)/3. PRICE_WEIGHTED 6 Weighted close price, (high+low+close+close)/4.*/ extern int ma.Method=0;/* Moving Average Method Constant Value Description MODE_SMA 0 Simple moving average, MODE_EMA 1 Exponential moving average, MODE_SMMA 2 Smoothed moving average, MODE_LWMA 3 Linear weighted moving average. */ extern int ma1.Length=0; extern int ma2.Length=0; extern int ma3.Length=0; extern int ma4.Length=0; extern int ma5.Length=0; extern int ma6.Length=0; extern int ma7.Length=0; extern int fib.SR.shadow.1=0; extern int fib.SR.shadow.2=0; extern int fib.SR.shadow.3=0; extern int fib.SR.shadow.4=0; extern int fib.SR.shadow.5=0; extern int fib.SR.shadow.6=0; extern int fib.SR.shadow.7=0; extern color fib.SR.shadow.1.c=AliceBlue; extern color fib.SR.shadow.2.c=LightBlue; extern color fib.SR.shadow.3.c=DodgerBlue; extern color fib.SR.shadow.4.c=RoyalBlue; extern color fib.SR.shadow.5.c=Blue; extern color fib.SR.shadow.6.c=MediumBlue; extern color fib.SR.shadow.7.c=DarkBlue; double ma1.p1, ma2.p1, ma3.p1, ma4.p1, ma5.p1, ma6.p1, ma7.p1; double ma1.p2, ma2.p2, ma3.p2, ma4.p2, ma5.p2, ma6.p2, ma7.p2; double ma1.p3, ma2.p3, ma3.p3, ma4.p3, ma5.p3, ma6.p3, ma7.p3; double ma1.p4, ma2.p4, ma3.p4, ma4.p4, ma5.p4, ma6.p4, ma7.p4; double tmb1,tmb2,tmb3,tmb4,tmr1,tmr2,tmr3,tmr4; datetime t1.p1, t2.p1, t1.p2, t2.p2, t1.p3, t2.p3, t1.p4, t2.p4; int init() { return(0); } int deinit() { Refresh(); return(0); } int start() { Refresh(); if(Use_Std_Reg) { //Time[STD.Rgres.length],Time[0] ObjectCreate("regression channel",OBJ_STDDEVCHANNEL,0,iTime(Symbol(),STD.Rgres.period,STD.Rgres.length),Bid,Time[0],Ask); ObjectSet("regression channel",OBJPROP_DEVIATION,STD.Rgres.width); ObjectSet("std channel",OBJPROP_COLOR,Orange); ObjectSet("regression channel",OBJPROP_RAY,true); ObjectCreate("std channel",OBJ_STDDEVCHANNEL,0,iTime(Symbol(),STD.Rgres.period,STD.Rgres.length),Bid,Time[0],Ask); ObjectSet("std channel",OBJPROP_DEVIATION,STD.width); ObjectSet("std channel",OBJPROP_COLOR,Olive); ObjectSet("std channel",OBJPROP_RAY,true); } //p1 ma settings ma1.p1=iMA(Symbol(),p1.ma,ma1.Length,0,ma.Method,ma.applied.price,0); ma2.p1=iMA(Symbol(),p1.ma,ma2.Length,0,ma.Method,ma.applied.price,0); ma3.p1=iMA(Symbol(),p1.ma,ma3.Length,0,ma.Method,ma.applied.price,0); ma4.p1=iMA(Symbol(),p1.ma,ma4.Length,0,ma.Method,ma.applied.price,0); ma5.p1=iMA(Symbol(),p1.ma,ma5.Length,0,ma.Method,ma.applied.price,0); ma6.p1=iMA(Symbol(),p1.ma,ma6.Length,0,ma.Method,ma.applied.price,0); ma7.p1=iMA(Symbol(),p1.ma,ma7.Length,0,ma.Method,ma.applied.price,0); //-------------- //p2 ma settings ma1.p2=iMA(Symbol(),p2.ma,ma1.Length,0,ma.Method,ma.applied.price,0); ma2.p2=iMA(Symbol(),p2.ma,ma2.Length,0,ma.Method,ma.applied.price,0); ma3.p2=iMA(Symbol(),p2.ma,ma3.Length,0,ma.Method,ma.applied.price,0); ma4.p2=iMA(Symbol(),p2.ma,ma4.Length,0,ma.Method,ma.applied.price,0); ma5.p2=iMA(Symbol(),p2.ma,ma5.Length,0,ma.Method,ma.applied.price,0); ma6.p2=iMA(Symbol(),p2.ma,ma6.Length,0,ma.Method,ma.applied.price,0); ma7.p2=iMA(Symbol(),p2.ma,ma7.Length,0,ma.Method,ma.applied.price,0); //-------------- //p3 ma settings ma1.p3=iMA(Symbol(),p3.ma,ma1.Length,0,ma.Method,ma.applied.price,0); ma2.p3=iMA(Symbol(),p3.ma,ma2.Length,0,ma.Method,ma.applied.price,0); ma3.p3=iMA(Symbol(),p3.ma,ma3.Length,0,ma.Method,ma.applied.price,0); ma4.p3=iMA(Symbol(),p3.ma,ma4.Length,0,ma.Method,ma.applied.price,0); ma5.p3=iMA(Symbol(),p3.ma,ma5.Length,0,ma.Method,ma.applied.price,0); ma6.p3=iMA(Symbol(),p3.ma,ma6.Length,0,ma.Method,ma.applied.price,0); ma7.p3=iMA(Symbol(),p3.ma,ma7.Length,0,ma.Method,ma.applied.price,0); //-------------- //p4 ma settings ma1.p4=iMA(Symbol(),p4.ma,ma1.Length,0,ma.Method,ma.applied.price,0); ma2.p4=iMA(Symbol(),p4.ma,ma2.Length,0,ma.Method,ma.applied.price,0); ma3.p4=iMA(Symbol(),p4.ma,ma3.Length,0,ma.Method,ma.applied.price,0); ma4.p4=iMA(Symbol(),p4.ma,ma4.Length,0,ma.Method,ma.applied.price,0); ma5.p4=iMA(Symbol(),p4.ma,ma5.Length,0,ma.Method,ma.applied.price,0); ma6.p4=iMA(Symbol(),p4.ma,ma6.Length,0,ma.Method,ma.applied.price,0); ma7.p4=iMA(Symbol(),p4.ma,ma7.Length,0,ma.Method,ma.applied.price,0); //-------------- tmb1=iCustom(NULL,p1.ma,"RSX",first_columnRSXperiods,0,0); tmb2=iCustom(NULL,p2.ma,"RSX",second_columnRSXperiods,0,0); tmb3=iCustom(NULL,p3.ma,"RSX",third_columnRSXperiods,0,0); tmb4=iCustom(NULL,p4.ma,"RSX",fourth_columnRSXperiods,0,0); tmr1=iCustom(NULL,p1.ma,"RSX",first_columnRSXperiods,0,0); tmr2=iCustom(NULL,p2.ma,"RSX",second_columnRSXperiods,0,0); tmr3=iCustom(NULL,p3.ma,"RSX",third_columnRSXperiods,0,0); tmr4=iCustom(NULL,p4.ma,"RSX",fourth_columnRSXperiods,0,0); Comment(p1.ma ,"Minutes rsx Level ",tmb1,"\n",p2.ma ,"Minutes rsx Level ",tmb2,"\n",p3.ma ,"Minutes Minutes rsx Level ",tmb3,"\n",p4.ma ,"Minutes Minutes rsx Level ",tmb4); Time.Coordinate.Set(); p1.Fib.Plot(); p2.Fib.Plot(); p3.Fib.Plot(); p4.Fib.Plot(); column(); //-------------- return(0);} //+------------------------------------------------------------------+ void Time.Coordinate.Set() { //....Variable Settings for Object Spatial Placement..... double zoom.multiplier;int bpw=BarsPerWindow(); if(bpw<25) {zoom.multiplier=0.05;} if(bpw>25 && bpw<50) {zoom.multiplier=0.07;} if(bpw>50 && bpw<175) {zoom.multiplier=0.12;} if(bpw>175 && bpw<375) {zoom.multiplier=0.25;} if(bpw>375 && bpw<750) {zoom.multiplier=0.5;} if(bpw>750) {zoom.multiplier=1;} double time.frame.multiplier; if(Period()==1) {time.frame.multiplier=0.65;} if(Period()==5) {time.frame.multiplier=3.25;} if(Period()==15) {time.frame.multiplier=9.75;} if(Period()==30) {time.frame.multiplier=19.5;} if(Period()==60) {time.frame.multiplier=39;} if(Period()==240) {time.frame.multiplier=156;} if(Period()==1440) {time.frame.multiplier=936;} if(Period()==10080) {time.frame.multiplier=6552;} if(Period()==43200) {time.frame.multiplier=28043;} t1.p1=Time[0]+(1000*time.frame.multiplier*zoom.multiplier); t2.p1=Time[0]+(3000*time.frame.multiplier*zoom.multiplier); t1.p2=Time[0]+(5000*time.frame.multiplier*zoom.multiplier); t2.p2=Time[0]+(7000*time.frame.multiplier*zoom.multiplier); t1.p3=Time[0]+(9000*time.frame.multiplier*zoom.multiplier); t2.p3=Time[0]+(11000*time.frame.multiplier*zoom.multiplier); t1.p4=Time[0]+(13000*time.frame.multiplier*zoom.multiplier); t2.p4=Time[0]+(16000*time.frame.multiplier*zoom.multiplier);}//end Time.Coordinate.Set() void p1.Fib.Plot() { //p1 dynamic fibo levels double lo.ma.p1,hi.ma.p1; lo.ma.p1=ma1.p1; if(ma2.p1<lo.ma.p1) {lo.ma.p1=ma2.p1;} if(ma3.p1<lo.ma.p1) {lo.ma.p1=ma3.p1;} if(ma4.p1<lo.ma.p1) {lo.ma.p1=ma4.p1;} if(ma5.p1<lo.ma.p1) {lo.ma.p1=ma5.p1;} if(ma6.p1<lo.ma.p1) {lo.ma.p1=ma6.p1;} if(ma7.p1<lo.ma.p1) {lo.ma.p1=ma7.p1;} lo.ma.p1=NormalizeDouble(lo.ma.p1+(fib.SR.shadow.1*Point),Digits); hi.ma.p1=ma7.p1; if(ma6.p1>hi.ma.p1) {hi.ma.p1=ma6.p1;} if(ma5.p1>hi.ma.p1) {hi.ma.p1=ma5.p1;} if(ma4.p1>hi.ma.p1) {hi.ma.p1=ma4.p1;} if(ma3.p1>hi.ma.p1) {hi.ma.p1=ma3.p1;} if(ma2.p1>hi.ma.p1) {hi.ma.p1=ma2.p1;} if(ma1.p1>hi.ma.p1) {hi.ma.p1=ma1.p1;} hi.ma.p1=NormalizeDouble(hi.ma.p1-(fib.SR.shadow.1*Point),Digits); //p1 center dynamic fib placement if(lo.ma.p1-hi.ma.p1>Ask-Bid) { ObjectCreate("lcf.p1",OBJ_TREND,0,t1.p1, lo.ma.p1, t2.p1, lo.ma.p1); ObjectSet("lcf.p1",OBJPROP_STYLE,STYLE_SOLID); ObjectSet("lcf.p1",OBJPROP_WIDTH,2); ObjectSet("lcf.p1",OBJPROP_RAY,false); ObjectSet("lcf.p1",OBJPROP_COLOR,fib.SR.shadow.1.c); ObjectSetText("lcf.p1",DoubleToStr(lo.ma.p1,Digits),7,"Arial",fib.SR.shadow.1.c); ObjectCreate("hcf.p1",OBJ_TREND,0,t1.p1, hi.ma.p1, t2.p1, hi.ma.p1); ObjectSet("hcf.p1",OBJPROP_STYLE,STYLE_SOLID); ObjectSet("hcf.p1",OBJPROP_WIDTH,2); ObjectSet("hcf.p1",OBJPROP_RAY,false); ObjectSet("hcf.p1",OBJPROP_COLOR,fib.SR.shadow.1.c); ObjectSetText("hcf.p1",DoubleToStr(hi.ma.p1,Digits),7,"Arial",fib.SR.shadow.1.c); } double lo.ma.p1.1, lo.ma.p1.2, lo.ma.p1.3, lo.ma.p1.4, lo.ma.p1.5, lo.ma.p1.6; lo.ma.p1.1=lo.ma.p1+(fib.SR.shadow.2*Point); lo.ma.p1.2=lo.ma.p1.1+(fib.SR.shadow.3*Point); lo.ma.p1.3=lo.ma.p1.2+(fib.SR.shadow.4*Point); lo.ma.p1.4=lo.ma.p1.3+(fib.SR.shadow.5*Point); lo.ma.p1.5=lo.ma.p1.4+(fib.SR.shadow.6*Point); lo.ma.p1.6=lo.ma.p1.5+(fib.SR.shadow.7*Point); double hi.ma.p1.1, hi.ma.p1.2, hi.ma.p1.3, hi.ma.p1.4, hi.ma.p1.5, hi.ma.p1.6; hi.ma.p1.1=hi.ma.p1-(fib.SR.shadow.2*Point); hi.ma.p1.2=hi.ma.p1.1-(fib.SR.shadow.3*Point); hi.ma.p1.3=hi.ma.p1.2-(fib.SR.shadow.4*Point); hi.ma.p1.4=hi.ma.p1.3-(fib.SR.shadow.5*Point); hi.ma.p1.5=hi.ma.p1.4-(fib.SR.shadow.6*Point); hi.ma.p1.6=hi.ma.p1.5-(fib.SR.shadow.7*Point); //p1 1st level (hi.1.p1, lo.1.p1) if(lo.ma.p1.1-hi.ma.p1.1>Ask-Bid) { ObjectCreate("lo.1.p1",OBJ_TREND,0,t1.p1, lo.ma.p1.1, t2.p1, lo.ma.p1.1); ObjectSet("lo.1.p1",OBJPROP_STYLE,STYLE_SOLID); ObjectSet("lo.1.p1",OBJPROP_WIDTH,2); ObjectSet("lo.1.p1",OBJPROP_RAY,false); ObjectSet("lo.1.p1",OBJPROP_COLOR,fib.SR.shadow.2.c); ObjectSetText("lo.1.p1",DoubleToStr(lo.ma.p1.1,Digits),7,"Arial",fib.SR.shadow.2.c); ObjectCreate("hi.1.p1",OBJ_TREND,0,t1.p1, hi.ma.p1.1, t2.p1, hi.ma.p1.1); ObjectSet("hi.1.p1",OBJPROP_STYLE,STYLE_SOLID); ObjectSet("hi.1.p1",OBJPROP_WIDTH,2); ObjectSet("hi.1.p1",OBJPROP_RAY,false); ObjectSet("hi.1.p1",OBJPROP_COLOR,fib.SR.shadow.2.c); ObjectSetText("hi.1.p1",DoubleToStr(hi.ma.p1.1,Digits),7,"Arial",fib.SR.shadow.2.c); } // 2st level (hi.2.p1, lo.2.p1) if(lo.ma.p1.2-hi.ma.p1.2>Ask-Bid) { ObjectCreate("lo.2.p1",OBJ_TREND,0,t1.p1, lo.ma.p1.2, t2.p1, lo.ma.p1.2); ObjectSet("lo.2.p1",OBJPROP_STYLE,STYLE_SOLID); ObjectSet("lo.2.p1",OBJPROP_WIDTH,2); ObjectSet("lo.2.p1",OBJPROP_RAY,false); ObjectSet("lo.2.p1",OBJPROP_COLOR,fib.SR.shadow.3.c); ObjectSetText("lo.2.p1",DoubleToStr(lo.ma.p1.2,Digits),7,"Arial",fib.SR.shadow.3.c); ObjectCreate("hi.2.p1",OBJ_TREND,0,t1.p1, hi.ma.p1.2, t2.p1, hi.ma.p1.2); ObjectSet("hi.2.p1",OBJPROP_STYLE,STYLE_SOLID); ObjectSet("hi.2.p1",OBJPROP_WIDTH,2); ObjectSet("hi.2.p1",OBJPROP_RAY,false); ObjectSet("hi.2.p1",OBJPROP_COLOR,fib.SR.shadow.3.c); ObjectSetText("hi.2.p1",DoubleToStr(hi.ma.p1.2,Digits),7,"Arial",fib.SR.shadow.3.c); } // 3rd level (hi.3.p1, lo.3.p1) if(lo.ma.p1.3-hi.ma.p1.3>Ask-Bid) { ObjectCreate("lo.3.p1",OBJ_TREND,0,t1.p1, lo.ma.p1.3, t2.p1, lo.ma.p1.3); ObjectSet("lo.3.p1",OBJPROP_STYLE,STYLE_SOLID); ObjectSet("lo.3.p1",OBJPROP_WIDTH,2); ObjectSet("lo.3.p1",OBJPROP_RAY,false); ObjectSet("lo.3.p1",OBJPROP_COLOR,fib.SR.shadow.4.c); ObjectSetText("lo.3.p1",DoubleToStr(lo.ma.p1.3,Digits),7,"Arial",fib.SR.shadow.4.c); ObjectCreate("hi.3.p1",OBJ_TREND,0,t1.p1, hi.ma.p1.3, t2.p1, hi.ma.p1.3); ObjectSet("hi.3.p1",OBJPROP_STYLE,STYLE_SOLID); ObjectSet("hi.3.p1",OBJPROP_WIDTH,2); ObjectSet("hi.3.p1",OBJPROP_RAY,false); ObjectSet("hi.3.p1",OBJPROP_COLOR,fib.SR.shadow.4.c); ObjectSetText("hi.3.p1",DoubleToStr(hi.ma.p1.3,Digits),7,"Arial",fib.SR.shadow.4.c); } // 4th level (hi.4.p1, lo.4.p1) if(lo.ma.p1.4-hi.ma.p1.4>Ask-Bid) { ObjectCreate("lo.4.p1",OBJ_TREND,0,t1.p1, lo.ma.p1.4, t2.p1, lo.ma.p1.4); ObjectSet("lo.4.p1",OBJPROP_STYLE,STYLE_SOLID); ObjectSet("lo.4.p1",OBJPROP_WIDTH,2); ObjectSet("lo.4.p1",OBJPROP_RAY,false); ObjectSet("lo.4.p1",OBJPROP_COLOR,fib.SR.shadow.5.c); ObjectSetText("lo.4.p1",DoubleToStr(lo.ma.p1.4,Digits),7,"Arial",fib.SR.shadow.5.c); ObjectCreate("hi.4.p1",OBJ_TREND,0,t1.p1, hi.ma.p1.4, t2.p1, hi.ma.p1.4); ObjectSet("hi.4.p1",OBJPROP_STYLE,STYLE_SOLID); ObjectSet("hi.4.p1",OBJPROP_WIDTH,2); ObjectSet("hi.4.p1",OBJPROP_RAY,false); ObjectSet("hi.4.p1",OBJPROP_COLOR,fib.SR.shadow.5.c); ObjectSetText("hi.4.p1",DoubleToStr(hi.ma.p1.4,Digits),7,"Arial",fib.SR.shadow.5.c); } // 5th level (hi.5.p1, lo.5.p1) if(lo.ma.p1.5-hi.ma.p1.5>Ask-Bid) { ObjectCreate("lo.5.p1",OBJ_TREND,0,t1.p1, lo.ma.p1.5, t2.p1, lo.ma.p1.5); ObjectSet("lo.5.p1",OBJPROP_STYLE,STYLE_SOLID); ObjectSet("lo.5.p1",OBJPROP_WIDTH,2); ObjectSet("lo.5.p1",OBJPROP_RAY,false); ObjectSet("lo.5.p1",OBJPROP_COLOR,fib.SR.shadow.6.c); ObjectSetText("lo.5.p1",DoubleToStr(lo.ma.p1.5,Digits),7,"Arial",fib.SR.shadow.6.c); ObjectCreate("hi.5.p1",OBJ_TREND,0,t1.p1, hi.ma.p1.5, t2.p1, hi.ma.p1.5); ObjectSet("hi.5.p1",OBJPROP_STYLE,STYLE_SOLID); ObjectSet("hi.5.p1",OBJPROP_WIDTH,2); ObjectSet("hi.5.p1",OBJPROP_RAY,false); ObjectSet("hi.5.p1",OBJPROP_COLOR,fib.SR.shadow.6.c); ObjectSetText("hi.5.p1",DoubleToStr(hi.ma.p1.5,Digits),7,"Arial",fib.SR.shadow.6.c); } // 6th level (hi.6.p1, lo.6.p1) if(lo.ma.p1.6-hi.ma.p1.6>Ask-Bid) { ObjectCreate("lo.6.p1",OBJ_TREND,0,t1.p1, lo.ma.p1.6, t2.p1, lo.ma.p1.6); ObjectSet("lo.6.p1",OBJPROP_STYLE,STYLE_SOLID); ObjectSet("lo.6.p1",OBJPROP_WIDTH,2); ObjectSet("lo.6.p1",OBJPROP_RAY,false); ObjectSet("lo.6.p1",OBJPROP_COLOR,fib.SR.shadow.7.c); ObjectSetText("lo.6.p1",DoubleToStr(lo.ma.p1.6,Digits),7,"Arial",fib.SR.shadow.7.c); ObjectCreate("hi.6.p1",OBJ_TREND,0,t1.p1, hi.ma.p1.6, t2.p1, hi.ma.p1.6); ObjectSet("hi.6.p1",OBJPROP_STYLE,STYLE_SOLID); ObjectSet("hi.6.p1",OBJPROP_WIDTH,2); ObjectSet("hi.6.p1",OBJPROP_RAY,false); ObjectSet("hi.6.p1",OBJPROP_COLOR,fib.SR.shadow.7.c); ObjectSetText("hi.6.p1",DoubleToStr(hi.ma.p1.6,Digits),7,"Arial",fib.SR.shadow.7.c); } //...............Moving Average Support & Resistance Levels.............................. string space=" "; // ObjectCreate("ma1.p1",OBJ_TEXT,0,t1.p1,ma1.p1);//13 ma ObjectSetText("ma1.p1",space+DoubleToStr(ma1.p1,Digits),8,"Arial",White); // ObjectCreate("ma2.p1",OBJ_TEXT,0,t1.p1,ma2.p1);//21 ma ObjectSetText("ma2.p1",space+DoubleToStr(ma2.p1,Digits),8,"Arial",White); // ObjectCreate("ma3.p1",OBJ_TEXT,0,t1.p1,ma3.p1);//34 ma if(Bid>ma3.p1) {ObjectSetText("ma3.p1",space+DoubleToStr(ma3.p1,Digits),8,"Arial",LightGreen);} if(Ask<ma3.p1) {ObjectSetText("ma3.p1",space+DoubleToStr(ma3.p1,Digits),8,"Arial",Pink);} if(Bid<=ma3.p1 && Ask>=ma3.p1) { ObjectSetText("ma3.p1",space+DoubleToStr(ma3.p1,Digits),8,"Arial",Yellow);} // ObjectCreate("ma4.p1",OBJ_TEXT,0,t1.p1,ma4.p1);//55 ma if(Bid>ma4.p1) {ObjectSetText("ma4.p1",space+DoubleToStr(ma4.p1,Digits),8,"Arial",LightGreen);} if(Ask<ma4.p1) {ObjectSetText("ma4.p1",space+DoubleToStr(ma4.p1,Digits),8,"Arial",Pink);} if(Bid<=ma4.p1 && Ask>=ma4.p1) { ObjectSetText("ma4.p1",space+DoubleToStr(ma4.p1,Digits),8,"Arial",Yellow);} // ObjectCreate("ma5.p1",OBJ_TEXT,0,t1.p1,ma5.p1);//89 ma if(Bid>ma5.p1) {ObjectSetText("ma5.p1",space+DoubleToStr(ma5.p1,Digits),8,"Arial",Green);} if(Ask<ma5.p1) {ObjectSetText("ma5.p1",space+DoubleToStr(ma5.p1,Digits),8,"Arial",Red);} if(Bid<=ma5.p1 && Ask>=ma5.p1) { ObjectSetText("ma5.p1",space+DoubleToStr(ma5.p1,Digits),8,"Arial",Yellow);} // ObjectCreate("ma6.p1",OBJ_TEXT,0,t1.p1,NormalizeDouble(ma6.p1,Digits));//144 ma if(Bid>ma6.p1) {ObjectSetText("ma6.p1",space+DoubleToStr(ma6.p1,Digits),8,"Arial",Green);} if(Ask<ma6.p1) {ObjectSetText("ma6.p1",space+DoubleToStr(ma6.p1,Digits),8,"Arial",Red);} if(Bid<=ma6.p1 && Ask>=ma6.p1) { ObjectSetText("ma6.p1",space+DoubleToStr(ma6.p1,Digits),8,"Arial",Yellow);} // ObjectCreate("ma7.p1",OBJ_TEXT,0,t1.p1,NormalizeDouble(ma7.p1,Digits));//233 ma if(Bid>ma7.p1) {ObjectSetText("ma7.p1",space+DoubleToStr(ma7.p1,Digits),8,"Arial",Green);} if(Ask<ma7.p1) {ObjectSetText("ma7.p1",space+DoubleToStr(ma7.p1,Digits),8,"Arial",Red);} if(Bid<=ma7.p1 && Ask>=ma7.p1) { ObjectSetText("ma7.p1",space+DoubleToStr(ma7.p1,Digits),8,"Arial",Yellow);} }//end p1.Fib.Plot() void p2.Fib.Plot() { //p2 dynamic fibo levels double lo.ma.p2,hi.ma.p2; lo.ma.p2=ma1.p2; if(ma2.p2<lo.ma.p2) {lo.ma.p2=ma2.p2;} if(ma3.p2<lo.ma.p2) {lo.ma.p2=ma3.p2;} if(ma4.p2<lo.ma.p2) {lo.ma.p2=ma4.p2;} if(ma5.p2<lo.ma.p2) {lo.ma.p2=ma5.p2;} if(ma6.p2<lo.ma.p2) {lo.ma.p2=ma6.p2;} if(ma7.p2<lo.ma.p2) {lo.ma.p2=ma7.p2;} lo.ma.p2=NormalizeDouble(lo.ma.p2+(fib.SR.shadow.1*Point),Digits); hi.ma.p2=ma7.p2; if(ma6.p2>hi.ma.p2) {hi.ma.p2=ma6.p2;} if(ma5.p2>hi.ma.p2) {hi.ma.p2=ma5.p2;} if(ma4.p2>hi.ma.p2) {hi.ma.p2=ma4.p2;} if(ma3.p2>hi.ma.p2) {hi.ma.p2=ma3.p2;} if(ma2.p2>hi.ma.p2) {hi.ma.p2=ma2.p2;} if(ma1.p2>hi.ma.p2) {hi.ma.p2=ma1.p2;} hi.ma.p2=NormalizeDouble(hi.ma.p2-(fib.SR.shadow.1*Point),Digits); //p2 center dynamic fib placement if(lo.ma.p2-hi.ma.p2>Ask-Bid) { ObjectCreate("lcf.p2",OBJ_TREND,0,t1.p2, lo.ma.p2, t2.p2, lo.ma.p2); ObjectSet("lcf.p2",OBJPROP_STYLE,STYLE_SOLID); ObjectSet("lcf.p2",OBJPROP_WIDTH,2); ObjectSet("lcf.p2",OBJPROP_RAY,false); ObjectSet("lcf.p2",OBJPROP_COLOR,fib.SR.shadow.1.c); ObjectSetText("lcf.p2",DoubleToStr(lo.ma.p2,Digits),7,"Arial",fib.SR.shadow.1.c); ObjectCreate("hcf.p2",OBJ_TREND,0,t1.p2, hi.ma.p2, t2.p2, hi.ma.p2); ObjectSet("hcf.p2",OBJPROP_STYLE,STYLE_SOLID); ObjectSet("hcf.p2",OBJPROP_WIDTH,2); ObjectSet("hcf.p2",OBJPROP_RAY,false); ObjectSet("hcf.p2",OBJPROP_COLOR,fib.SR.shadow.1.c); ObjectSetText("hcf.p2",DoubleToStr(hi.ma.p2,Digits),7,"Arial",fib.SR.shadow.1.c); } double lo.ma.p2.1, lo.ma.p2.2, lo.ma.p2.3, lo.ma.p2.4, lo.ma.p2.5, lo.ma.p2.6; lo.ma.p2.1=lo.ma.p2+(fib.SR.shadow.2*Point); lo.ma.p2.2=lo.ma.p2.1+(fib.SR.shadow.3*Point); lo.ma.p2.3=lo.ma.p2.2+(fib.SR.shadow.4*Point); lo.ma.p2.4=lo.ma.p2.3+(fib.SR.shadow.5*Point); lo.ma.p2.5=lo.ma.p2.4+(fib.SR.shadow.6*Point); lo.ma.p2.6=lo.ma.p2.5+(fib.SR.shadow.7*Point); double hi.ma.p2.1, hi.ma.p2.2, hi.ma.p2.3, hi.ma.p2.4, hi.ma.p2.5, hi.ma.p2.6; hi.ma.p2.1=hi.ma.p2-(fib.SR.shadow.2*Point); hi.ma.p2.2=hi.ma.p2.1-(fib.SR.shadow.3*Point); hi.ma.p2.3=hi.ma.p2.2-(fib.SR.shadow.4*Point); hi.ma.p2.4=hi.ma.p2.3-(fib.SR.shadow.5*Point); hi.ma.p2.5=hi.ma.p2.4-(fib.SR.shadow.6*Point); hi.ma.p2.6=hi.ma.p2.5-(fib.SR.shadow.7*Point); //p2 1st level (hi.1.p2, lo.1.p2) if(lo.ma.p2.1-hi.ma.p2.1>Ask-Bid) { ObjectCreate("lo.1.p2",OBJ_TREND,0,t1.p2, lo.ma.p2.1, t2.p2, lo.ma.p2.1); ObjectSet("lo.1.p2",OBJPROP_STYLE,STYLE_SOLID); ObjectSet("lo.1.p2",OBJPROP_WIDTH,2); ObjectSet("lo.1.p2",OBJPROP_RAY,false); ObjectSet("lo.1.p2",OBJPROP_COLOR,fib.SR.shadow.2.c); ObjectSetText("lo.1.p2",DoubleToStr(lo.ma.p2.1,Digits),7,"Arial",fib.SR.shadow.2.c); ObjectCreate("hi.1.p2",OBJ_TREND,0,t1.p2, hi.ma.p2.1, t2.p2, hi.ma.p2.1); ObjectSet("hi.1.p2",OBJPROP_STYLE,STYLE_SOLID); ObjectSet("hi.1.p2",OBJPROP_WIDTH,2); ObjectSet("hi.1.p2",OBJPROP_RAY,false); ObjectSet("hi.1.p2",OBJPROP_COLOR,fib.SR.shadow.2.c); ObjectSetText("hi.1.p2",DoubleToStr(hi.ma.p2.1,Digits),7,"Arial",fib.SR.shadow.2.c); } // 2st level (hi.2.p2, lo.2.p2) if(lo.ma.p2.2-hi.ma.p2.2>Ask-Bid) { ObjectCreate("lo.2.p2",OBJ_TREND,0,t1.p2, lo.ma.p2.2, t2.p2, lo.ma.p2.2); ObjectSet("lo.2.p2",OBJPROP_STYLE,STYLE_SOLID); ObjectSet("lo.2.p2",OBJPROP_WIDTH,2); ObjectSet("lo.2.p2",OBJPROP_RAY,false); ObjectSet("lo.2.p2",OBJPROP_COLOR,fib.SR.shadow.3.c); ObjectSetText("lo.2.p2",DoubleToStr(lo.ma.p2.2,Digits),7,"Arial",fib.SR.shadow.3.c); ObjectCreate("hi.2.p2",OBJ_TREND,0,t1.p2, hi.ma.p2.2, t2.p2, hi.ma.p2.2); ObjectSet("hi.2.p2",OBJPROP_STYLE,STYLE_SOLID); ObjectSet("hi.2.p2",OBJPROP_WIDTH,2); ObjectSet("hi.2.p2",OBJPROP_RAY,false); ObjectSet("hi.2.p2",OBJPROP_COLOR,fib.SR.shadow.3.c); ObjectSetText("hi.2.p2",DoubleToStr(hi.ma.p2.2,Digits),7,"Arial",fib.SR.shadow.3.c); } // 3rd level (hi.3.p2, lo.3.p2) if(lo.ma.p2.3-hi.ma.p2.3>Ask-Bid) { ObjectCreate("lo.3.p2",OBJ_TREND,0,t1.p2, lo.ma.p2.3, t2.p2, lo.ma.p2.3); ObjectSet("lo.3.p2",OBJPROP_STYLE,STYLE_SOLID); ObjectSet("lo.3.p2",OBJPROP_WIDTH,2); ObjectSet("lo.3.p2",OBJPROP_RAY,false); ObjectSet("lo.3.p2",OBJPROP_COLOR,fib.SR.shadow.4.c); ObjectSetText("lo.3.p2",DoubleToStr(lo.ma.p2.3,Digits),7,"Arial",fib.SR.shadow.4.c); ObjectCreate("hi.3.p2",OBJ_TREND,0,t1.p2, hi.ma.p2.3, t2.p2, hi.ma.p2.3); ObjectSet("hi.3.p2",OBJPROP_STYLE,STYLE_SOLID); ObjectSet("hi.3.p2",OBJPROP_WIDTH,2); ObjectSet("hi.3.p2",OBJPROP_RAY,false); ObjectSet("hi.3.p2",OBJPROP_COLOR,fib.SR.shadow.4.c); ObjectSetText("hi.3.p2",DoubleToStr(hi.ma.p2.3,Digits),7,"Arial",fib.SR.shadow.4.c); } // 4th level (hi.4.p2, lo.4.p2) if(lo.ma.p2.4-hi.ma.p2.4>Ask-Bid) { ObjectCreate("lo.4.p2",OBJ_TREND,0,t1.p2, lo.ma.p2.4, t2.p2, lo.ma.p2.4); ObjectSet("lo.4.p2",OBJPROP_STYLE,STYLE_SOLID); ObjectSet("lo.4.p2",OBJPROP_WIDTH,2); ObjectSet("lo.4.p2",OBJPROP_RAY,false); ObjectSet("lo.4.p2",OBJPROP_COLOR,fib.SR.shadow.5.c); ObjectSetText("lo.4.p2",DoubleToStr(lo.ma.p2.4,Digits),7,"Arial",fib.SR.shadow.5.c); ObjectCreate("hi.4.p2",OBJ_TREND,0,t1.p2, hi.ma.p2.4, t2.p2, hi.ma.p2.4); ObjectSet("hi.4.p2",OBJPROP_STYLE,STYLE_SOLID); ObjectSet("hi.4.p2",OBJPROP_WIDTH,2); ObjectSet("hi.4.p2",OBJPROP_RAY,false); ObjectSet("hi.4.p2",OBJPROP_COLOR,fib.SR.shadow.5.c); ObjectSetText("hi.4.p2",DoubleToStr(hi.ma.p2.4,Digits),7,"Arial",fib.SR.shadow.5.c); } // 5th level (hi.5.p2, lo.5.p2) if(lo.ma.p2.5-hi.ma.p2.5>Ask-Bid) { ObjectCreate("lo.5.p2",OBJ_TREND,0,t1.p2, lo.ma.p2.5, t2.p2, lo.ma.p2.5); ObjectSet("lo.5.p2",OBJPROP_STYLE,STYLE_SOLID); ObjectSet("lo.5.p2",OBJPROP_WIDTH,2); ObjectSet("lo.5.p2",OBJPROP_RAY,false); ObjectSet("lo.5.p2",OBJPROP_COLOR,fib.SR.shadow.6.c); ObjectSetText("lo.5.p2",DoubleToStr(lo.ma.p2.5,Digits),7,"Arial",fib.SR.shadow.6.c); ObjectCreate("hi.5.p2",OBJ_TREND,0,t1.p2, hi.ma.p2.5, t2.p2, hi.ma.p2.5); ObjectSet("hi.5.p2",OBJPROP_STYLE,STYLE_SOLID); ObjectSet("hi.5.p2",OBJPROP_WIDTH,2); ObjectSet("hi.5.p2",OBJPROP_RAY,false); ObjectSet("hi.5.p2",OBJPROP_COLOR,fib.SR.shadow.6.c); ObjectSetText("hi.5.p2",DoubleToStr(hi.ma.p2.5,Digits),7,"Arial",fib.SR.shadow.6.c); } // 6th level (hi.6.p2, lo.6.p2) if(lo.ma.p2.6-hi.ma.p2.6>Ask-Bid) { ObjectCreate("lo.6.p2",OBJ_TREND,0,t1.p2, lo.ma.p2.6, t2.p2, lo.ma.p2.6); ObjectSet("lo.6.p2",OBJPROP_STYLE,STYLE_SOLID); ObjectSet("lo.6.p2",OBJPROP_WIDTH,2); ObjectSet("lo.6.p2",OBJPROP_RAY,false); ObjectSet("lo.6.p2",OBJPROP_COLOR,fib.SR.shadow.7.c); ObjectSetText("lo.6.p2",DoubleToStr(lo.ma.p2.6,Digits),7,"Arial",fib.SR.shadow.7.c); ObjectCreate("hi.6.p2",OBJ_TREND,0,t1.p2, hi.ma.p2.6, t2.p2, hi.ma.p2.6); ObjectSet("hi.6.p2",OBJPROP_STYLE,STYLE_SOLID); ObjectSet("hi.6.p2",OBJPROP_WIDTH,2); ObjectSet("hi.6.p2",OBJPROP_RAY,false); ObjectSet("hi.6.p2",OBJPROP_COLOR,fib.SR.shadow.7.c); ObjectSetText("hi.6.p2",DoubleToStr(hi.ma.p2.6,Digits),7,"Arial",fib.SR.shadow.7.c); } //...............Moving Average Support & Resistance Levels.............................. string space=" "; // ObjectCreate("ma1.p2",OBJ_TEXT,0,t1.p2,ma1.p2);//13 ma ObjectSetText("ma1.p2",space+DoubleToStr(ma1.p2,Digits),8,"Arial",White); // ObjectCreate("ma2.p2",OBJ_TEXT,0,t1.p2,ma2.p2);//21 ma ObjectSetText("ma2.p2",space+DoubleToStr(ma2.p2,Digits),8,"Arial",White); // ObjectCreate("ma3.p2",OBJ_TEXT,0,t1.p2,ma3.p2);//34 ma if(Bid>ma3.p2) {ObjectSetText("ma3.p2",space+DoubleToStr(ma3.p2,Digits),8,"Arial",LightGreen);} if(Ask<ma3.p2) {ObjectSetText("ma3.p2",space+DoubleToStr(ma3.p2,Digits),8,"Arial",Pink);} if(Bid<=ma3.p2 && Ask>=ma3.p2) { ObjectSetText("ma3.p2",space+DoubleToStr(ma3.p2,Digits),8,"Arial",Yellow);} // ObjectCreate("ma4.p2",OBJ_TEXT,0,t1.p2,ma4.p2);//55 ma if(Bid>ma4.p2) {ObjectSetText("ma4.p2",space+DoubleToStr(ma4.p2,Digits),8,"Arial",LightGreen);} if(Ask<ma4.p2) {ObjectSetText("ma4.p2",space+DoubleToStr(ma4.p2,Digits),8,"Arial",Pink);} if(Bid<=ma4.p2 && Ask>=ma4.p2) { ObjectSetText("ma4.p2",space+DoubleToStr(ma4.p2,Digits),8,"Arial",Yellow);} //ObjectCreate("ma5.p2",OBJ_TEXT,0,t1.p2,ma5.p2);//89 ma if(Bid>ma5.p2) {ObjectSetText("ma5.p2",space+DoubleToStr(ma5.p2,Digits),8,"Arial",Green);} if(Ask<ma5.p2) {ObjectSetText("ma5.p2",space+DoubleToStr(ma5.p2,Digits),8,"Arial",Red);} if(Bid<=ma5.p2 && Ask>=ma5.p2) { ObjectSetText("ma5.p2",space+DoubleToStr(ma5.p2,Digits),8,"Arial",Yellow);} // ObjectCreate("ma6.p2",OBJ_TEXT,0,t1.p2,NormalizeDouble(ma6.p2,Digits));//144 ma if(Bid>ma6.p2) {ObjectSetText("ma6.p2",space+DoubleToStr(ma6.p2,Digits),8,"Arial",Green);} if(Ask<ma6.p2) {ObjectSetText("ma6.p2",space+DoubleToStr(ma6.p2,Digits),8,"Arial",Red);} if(Bid<=ma6.p2 && Ask>=ma6.p2) { ObjectSetText("ma6.p2",space+DoubleToStr(ma6.p2,Digits),8,"Arial",Yellow);} // ObjectCreate("ma7.p2",OBJ_TEXT,0,t1.p2,NormalizeDouble(ma7.p2,Digits));//233 ma if(Bid>ma7.p2) {ObjectSetText("ma7.p2",space+DoubleToStr(ma7.p2,Digits),8,"Arial",Green);} if(Ask<ma7.p2) {ObjectSetText("ma7.p2",space+DoubleToStr(ma7.p2,Digits),8,"Arial",Red);} if(Bid<=ma7.p2 && Ask>=ma7.p2) { ObjectSetText("ma7.p2",space+DoubleToStr(ma7.p2,Digits),8,"Arial",Yellow);} }//end p2.Fib.Plot() void p3.Fib.Plot() { //p3 dynamic fibo levels double lo.ma.p3,hi.ma.p3; lo.ma.p3=ma1.p3; if(ma2.p3<lo.ma.p3) {lo.ma.p3=ma2.p3;} if(ma3.p3<lo.ma.p3) {lo.ma.p3=ma3.p3;} if(ma4.p3<lo.ma.p3) {lo.ma.p3=ma4.p3;} if(ma5.p3<lo.ma.p3) {lo.ma.p3=ma5.p3;} if(ma6.p3<lo.ma.p3) {lo.ma.p3=ma6.p3;} if(ma7.p3<lo.ma.p3) {lo.ma.p3=ma7.p3;} lo.ma.p3=NormalizeDouble(lo.ma.p3+(fib.SR.shadow.1*Point),Digits); hi.ma.p3=ma7.p3; if(ma6.p3>hi.ma.p3) {hi.ma.p3=ma6.p3;} if(ma5.p3>hi.ma.p3) {hi.ma.p3=ma5.p3;} if(ma4.p3>hi.ma.p3) {hi.ma.p3=ma4.p3;} if(ma3.p3>hi.ma.p3) {hi.ma.p3=ma3.p3;} if(ma2.p3>hi.ma.p3) {hi.ma.p3=ma2.p3;} if(ma1.p3>hi.ma.p3) {hi.ma.p3=ma1.p3;} hi.ma.p3=NormalizeDouble(hi.ma.p3-(fib.SR.shadow.1*Point),Digits); //p3 center dynamic fib placement if(lo.ma.p3-hi.ma.p3>Ask-Bid) { ObjectCreate("lcf.p3",OBJ_TREND,0,t1.p3, lo.ma.p3, t2.p3, lo.ma.p3); ObjectSet("lcf.p3",OBJPROP_STYLE,STYLE_SOLID); ObjectSet("lcf.p3",OBJPROP_WIDTH,2); ObjectSet("lcf.p3",OBJPROP_RAY,false); ObjectSet("lcf.p3",OBJPROP_COLOR,fib.SR.shadow.1.c); ObjectSetText("lcf.p3",DoubleToStr(lo.ma.p3,Digits),7,"Arial",fib.SR.shadow.1.c); ObjectCreate("hcf.p3",OBJ_TREND,0,t1.p3, hi.ma.p3, t2.p3, hi.ma.p3); ObjectSet("hcf.p3",OBJPROP_STYLE,STYLE_SOLID); ObjectSet("hcf.p3",OBJPROP_WIDTH,2); ObjectSet("hcf.p3",OBJPROP_RAY,false); ObjectSet("hcf.p3",OBJPROP_COLOR,fib.SR.shadow.1.c); ObjectSetText("hcf.p3",DoubleToStr(hi.ma.p3,Digits),7,"Arial",fib.SR.shadow.1.c); } double lo.ma.p3.1, lo.ma.p3.2, lo.ma.p3.3, lo.ma.p3.4, lo.ma.p3.5, lo.ma.p3.6; lo.ma.p3.1=lo.ma.p3+(fib.SR.shadow.2*Point); lo.ma.p3.2=lo.ma.p3.1+(fib.SR.shadow.3*Point); lo.ma.p3.3=lo.ma.p3.2+(fib.SR.shadow.4*Point); lo.ma.p3.4=lo.ma.p3.3+(fib.SR.shadow.5*Point); lo.ma.p3.5=lo.ma.p3.4+(fib.SR.shadow.6*Point); lo.ma.p3.6=lo.ma.p3.5+(fib.SR.shadow.7*Point); double hi.ma.p3.1, hi.ma.p3.2, hi.ma.p3.3, hi.ma.p3.4, hi.ma.p3.5, hi.ma.p3.6; hi.ma.p3.1=hi.ma.p3-(fib.SR.shadow.2*Point); hi.ma.p3.2=hi.ma.p3.1-(fib.SR.shadow.3*Point); hi.ma.p3.3=hi.ma.p3.2-(fib.SR.shadow.4*Point); hi.ma.p3.4=hi.ma.p3.3-(fib.SR.shadow.5*Point); hi.ma.p3.5=hi.ma.p3.4-(fib.SR.shadow.6*Point); hi.ma.p3.6=hi.ma.p3.5-(fib.SR.shadow.7*Point); //p3 1st level (hi.1.p3, lo.1.p3) if(lo.ma.p3.1-hi.ma.p3.1>Ask-Bid) { ObjectCreate("lo.1.p3",OBJ_TREND,0,t1.p3, lo.ma.p3.1, t2.p3, lo.ma.p3.1); ObjectSet("lo.1.p3",OBJPROP_STYLE,STYLE_SOLID); ObjectSet("lo.1.p3",OBJPROP_WIDTH,2); ObjectSet("lo.1.p3",OBJPROP_RAY,false); ObjectSet("lo.1.p3",OBJPROP_COLOR,fib.SR.shadow.2.c); ObjectSetText("lo.1.p3",DoubleToStr(lo.ma.p3.1,Digits),7,"Arial",fib.SR.shadow.2.c); ObjectCreate("hi.1.p3",OBJ_TREND,0,t1.p3, hi.ma.p3.1, t2.p3, hi.ma.p3.1); ObjectSet("hi.1.p3",OBJPROP_STYLE,STYLE_SOLID); ObjectSet("hi.1.p3",OBJPROP_WIDTH,2); ObjectSet("hi.1.p3",OBJPROP_RAY,false); ObjectSet("hi.1.p3",OBJPROP_COLOR,fib.SR.shadow.2.c); ObjectSetText("hi.1.p3",DoubleToStr(hi.ma.p3.1,Digits),7,"Arial",fib.SR.shadow.2.c); } // 2st level (hi.2.p3, lo.2.p3) if(lo.ma.p3.2-hi.ma.p3.2>Ask-Bid) { ObjectCreate("lo.2.p3",OBJ_TREND,0,t1.p3, lo.ma.p3.2, t2.p3, lo.ma.p3.2); ObjectSet("lo.2.p3",OBJPROP_STYLE,STYLE_SOLID); ObjectSet("lo.2.p3",OBJPROP_WIDTH,2); ObjectSet("lo.2.p3",OBJPROP_RAY,false); ObjectSet("lo.2.p3",OBJPROP_COLOR,fib.SR.shadow.3.c); ObjectSetText("lo.2.p3",DoubleToStr(lo.ma.p3.2,Digits),7,"Arial",fib.SR.shadow.3.c); ObjectCreate("hi.2.p3",OBJ_TREND,0,t1.p3, hi.ma.p3.2, t2.p3, hi.ma.p3.2); ObjectSet("hi.2.p3",OBJPROP_STYLE,STYLE_SOLID); ObjectSet("hi.2.p3",OBJPROP_WIDTH,2); ObjectSet("hi.2.p3",OBJPROP_RAY,false); ObjectSet("hi.2.p3",OBJPROP_COLOR,fib.SR.shadow.3.c); ObjectSetText("hi.2.p3",DoubleToStr(hi.ma.p3.2,Digits),7,"Arial",fib.SR.shadow.3.c); } // 3rd level (hi.3.p3, lo.3.p3) if(lo.ma.p3.3-hi.ma.p3.3>Ask-Bid) { ObjectCreate("lo.3.p3",OBJ_TREND,0,t1.p3, lo.ma.p3.3, t2.p3, lo.ma.p3.3); ObjectSet("lo.3.p3",OBJPROP_STYLE,STYLE_SOLID); ObjectSet("lo.3.p3",OBJPROP_WIDTH,2); ObjectSet("lo.3.p3",OBJPROP_RAY,false); ObjectSet("lo.3.p3",OBJPROP_COLOR,fib.SR.shadow.4.c); ObjectSetText("lo.3.p3",DoubleToStr(lo.ma.p3.3,Digits),7,"Arial",fib.SR.shadow.4.c); ObjectCreate("hi.3.p3",OBJ_TREND,0,t1.p3, hi.ma.p3.3, t2.p3, hi.ma.p3.3); ObjectSet("hi.3.p3",OBJPROP_STYLE,STYLE_SOLID); ObjectSet("hi.3.p3",OBJPROP_WIDTH,2); ObjectSet("hi.3.p3",OBJPROP_RAY,false); ObjectSet("hi.3.p3",OBJPROP_COLOR,fib.SR.shadow.4.c); ObjectSetText("hi.3.p3",DoubleToStr(hi.ma.p3.3,Digits),7,"Arial",fib.SR.shadow.4.c); } // 4th level (hi.4.p3, lo.4.p3) if(lo.ma.p3.4-hi.ma.p3.4>Ask-Bid) { ObjectCreate("lo.4.p3",OBJ_TREND,0,t1.p3, lo.ma.p3.4, t2.p3, lo.ma.p3.4); ObjectSet("lo.4.p3",OBJPROP_STYLE,STYLE_SOLID); ObjectSet("lo.4.p3",OBJPROP_WIDTH,2); ObjectSet("lo.4.p3",OBJPROP_RAY,false); ObjectSet("lo.4.p3",OBJPROP_COLOR,fib.SR.shadow.5.c); ObjectSetText("lo.4.p3",DoubleToStr(lo.ma.p3.4,Digits),7,"Arial",fib.SR.shadow.5.c); ObjectCreate("hi.4.p3",OBJ_TREND,0,t1.p3, hi.ma.p3.4, t2.p3, hi.ma.p3.4); ObjectSet("hi.4.p3",OBJPROP_STYLE,STYLE_SOLID); ObjectSet("hi.4.p3",OBJPROP_WIDTH,2); ObjectSet("hi.4.p3",OBJPROP_RAY,false); ObjectSet("hi.4.p3",OBJPROP_COLOR,fib.SR.shadow.5.c); ObjectSetText("hi.4.p3",DoubleToStr(hi.ma.p3.4,Digits),7,"Arial",fib.SR.shadow.5.c); } // 5th level (hi.5.p3, lo.5.p3) if(lo.ma.p3.5-hi.ma.p3.5>Ask-Bid) { ObjectCreate("lo.5.p3",OBJ_TREND,0,t1.p3, lo.ma.p3.5, t2.p3, lo.ma.p3.5); ObjectSet("lo.5.p3",OBJPROP_STYLE,STYLE_SOLID); ObjectSet("lo.5.p3",OBJPROP_WIDTH,2); ObjectSet("lo.5.p3",OBJPROP_RAY,false); ObjectSet("lo.5.p3",OBJPROP_COLOR,fib.SR.shadow.6.c); ObjectSetText("lo.5.p3",DoubleToStr(lo.ma.p3.5,Digits),7,"Arial",fib.SR.shadow.6.c); ObjectCreate("hi.5.p3",OBJ_TREND,0,t1.p3, hi.ma.p3.5, t2.p3, hi.ma.p3.5); ObjectSet("hi.5.p3",OBJPROP_STYLE,STYLE_SOLID); ObjectSet("hi.5.p3",OBJPROP_WIDTH,2); ObjectSet("hi.5.p3",OBJPROP_RAY,false); ObjectSet("hi.5.p3",OBJPROP_COLOR,fib.SR.shadow.6.c); ObjectSetText("hi.5.p3",DoubleToStr(hi.ma.p3.5,Digits),7,"Arial",fib.SR.shadow.6.c); } // 6th level (hi.6.p3, lo.6.p3) if(lo.ma.p3.6-hi.ma.p3.6>Ask-Bid) { ObjectCreate("lo.6.p3",OBJ_TREND,0,t1.p3, lo.ma.p3.6, t2.p3, lo.ma.p3.6); ObjectSet("lo.6.p3",OBJPROP_STYLE,STYLE_SOLID); ObjectSet("lo.6.p3",OBJPROP_WIDTH,2); ObjectSet("lo.6.p3",OBJPROP_RAY,false); ObjectSet("lo.6.p3",OBJPROP_COLOR,fib.SR.shadow.7.c); ObjectSetText("lo.6.p3",DoubleToStr(lo.ma.p3.6,Digits),7,"Arial",fib.SR.shadow.7.c); ObjectCreate("hi.6.p3",OBJ_TREND,0,t1.p3, hi.ma.p3.6, t2.p3, hi.ma.p3.6); ObjectSet("hi.6.p3",OBJPROP_STYLE,STYLE_SOLID); ObjectSet("hi.6.p3",OBJPROP_WIDTH,2); ObjectSet("hi.6.p3",OBJPROP_RAY,false); ObjectSet("hi.6.p3",OBJPROP_COLOR,fib.SR.shadow.7.c); ObjectSetText("hi.6.p3",DoubleToStr(hi.ma.p3.6,Digits),7,"Arial",fib.SR.shadow.7.c); } //...............Moving Average Support & Resistance Levels.............................. string space=" "; // ObjectCreate("ma1.p3",OBJ_TEXT,0,t1.p3,ma1.p3);//13 ma ObjectSetText("ma1.p3",space+DoubleToStr(ma1.p3,Digits),8,"Arial",White); // ObjectCreate("ma2.p3",OBJ_TEXT,0,t1.p3,ma2.p3);//21 ma ObjectSetText("ma2.p3",space+DoubleToStr(ma2.p3,Digits),8,"Arial",White); // ObjectCreate("ma3.p3",OBJ_TEXT,0,t1.p3,ma3.p3);//34 ma if(Bid>ma3.p3) {ObjectSetText("ma3.p3",space+DoubleToStr(ma3.p3,Digits),8,"Arial",LightGreen);} if(Ask<ma3.p3) {ObjectSetText("ma3.p3",space+DoubleToStr(ma3.p3,Digits),8,"Arial",Pink);} if(Bid<=ma3.p3 && Ask>=ma3.p3) { ObjectSetText("ma3.p3",space+DoubleToStr(ma3.p3,Digits),8,"Arial",Yellow);} // ObjectCreate("ma4.p3",OBJ_TEXT,0,t1.p3,ma4.p3);//55 ma if(Bid>ma4.p3) {ObjectSetText("ma4.p3",space+DoubleToStr(ma4.p3,Digits),8,"Arial",LightGreen);} if(Ask<ma4.p3) {ObjectSetText("ma4.p3",space+DoubleToStr(ma4.p3,Digits),8,"Arial",Pink);} if(Bid<=ma4.p3 && Ask>=ma4.p3) { ObjectSetText("ma4.p3",space+DoubleToStr(ma4.p3,Digits),8,"Arial",Yellow);} // ObjectCreate("ma5.p3",OBJ_TEXT,0,t1.p3,ma5.p3);//89 ma if(Bid>ma5.p3) {ObjectSetText("ma5.p3",space+DoubleToStr(ma5.p3,Digits),8,"Arial",Green);} if(Ask<ma5.p3) {ObjectSetText("ma5.p3",space+DoubleToStr(ma5.p3,Digits),8,"Arial",Red);} if(Bid<=ma5.p3 && Ask>=ma5.p3) { ObjectSetText("ma5.p3",space+DoubleToStr(ma5.p3,Digits),8,"Arial",Yellow);} // ObjectCreate("ma6.p3",OBJ_TEXT,0,t1.p3,NormalizeDouble(ma6.p3,Digits));//144 ma if(Bid>ma6.p3) {ObjectSetText("ma6.p3",space+DoubleToStr(ma6.p3,Digits),8,"Arial",Green);} if(Ask<ma6.p3) {ObjectSetText("ma6.p3",space+DoubleToStr(ma6.p3,Digits),8,"Arial",Red);} if(Bid<=ma6.p3 && Ask>=ma6.p3) { ObjectSetText("ma6.p3",space+DoubleToStr(ma6.p3,Digits),8,"Arial",Yellow);} // ObjectCreate("ma7.p3",OBJ_TEXT,0,t1.p3,NormalizeDouble(ma7.p3,Digits));//233 ma if(Bid>ma7.p3) {ObjectSetText("ma7.p3",space+DoubleToStr(ma7.p3,Digits),8,"Arial",Green);} if(Ask<ma7.p3) {ObjectSetText("ma7.p3",space+DoubleToStr(ma7.p3,Digits),8,"Arial",Red);} if(Bid<=ma7.p3 && Ask>=ma7.p3) { ObjectSetText("ma7.p3",space+DoubleToStr(ma7.p3,Digits),8,"Arial",Yellow);} }//end p3.Fib.Plot() void p4.Fib.Plot() { //p4 dynamic fibo levels double lo.ma.p4,hi.ma.p4; lo.ma.p4=ma1.p4; if(ma2.p4<lo.ma.p4) {lo.ma.p4=ma2.p4;} if(ma3.p4<lo.ma.p4) {lo.ma.p4=ma3.p4;} if(ma4.p4<lo.ma.p4) {lo.ma.p4=ma4.p4;} if(ma5.p4<lo.ma.p4) {lo.ma.p4=ma5.p4;} if(ma6.p4<lo.ma.p4) {lo.ma.p4=ma6.p4;} if(ma7.p4<lo.ma.p4) {lo.ma.p4=ma7.p4;} lo.ma.p4=NormalizeDouble(lo.ma.p4+(fib.SR.shadow.1*Point),Digits); hi.ma.p4=ma7.p4; if(ma6.p4>hi.ma.p4) {hi.ma.p4=ma6.p4;} if(ma5.p4>hi.ma.p4) {hi.ma.p4=ma5.p4;} if(ma4.p4>hi.ma.p4) {hi.ma.p4=ma4.p4;} if(ma3.p4>hi.ma.p4) {hi.ma.p4=ma3.p4;} if(ma2.p4>hi.ma.p4) {hi.ma.p4=ma2.p4;} if(ma1.p4>hi.ma.p4) {hi.ma.p4=ma1.p4;} hi.ma.p4=NormalizeDouble(hi.ma.p4-(fib.SR.shadow.1*Point),Digits); //p4 center dynamic fib placement if(lo.ma.p4-hi.ma.p4>Ask-Bid) { ObjectCreate("lcf.p4",OBJ_TREND,0,t1.p4, lo.ma.p4, t2.p4, lo.ma.p4); ObjectSet("lcf.p4",OBJPROP_STYLE,STYLE_SOLID); ObjectSet("lcf.p4",OBJPROP_WIDTH,2); ObjectSet("lcf.p4",OBJPROP_RAY,false); ObjectSet("lcf.p4",OBJPROP_COLOR,fib.SR.shadow.1.c); ObjectSetText("lcf.p4",DoubleToStr(lo.ma.p4,Digits),7,"Arial",fib.SR.shadow.1.c); ObjectCreate("hcf.p4",OBJ_TREND,0,t1.p4, hi.ma.p4, t2.p4, hi.ma.p4); ObjectSet("hcf.p4",OBJPROP_STYLE,STYLE_SOLID); ObjectSet("hcf.p4",OBJPROP_WIDTH,2); ObjectSet("hcf.p4",OBJPROP_RAY,false); ObjectSet("hcf.p4",OBJPROP_COLOR,fib.SR.shadow.1.c); ObjectSetText("hcf.p4",DoubleToStr(hi.ma.p4,Digits),7,"Arial",fib.SR.shadow.1.c); } double lo.ma.p4.1, lo.ma.p4.2, lo.ma.p4.3, lo.ma.p4.4, lo.ma.p4.5, lo.ma.p4.6; lo.ma.p4.1=lo.ma.p4+(fib.SR.shadow.2*Point); lo.ma.p4.2=lo.ma.p4.1+(fib.SR.shadow.3*Point); lo.ma.p4.3=lo.ma.p4.2+(fib.SR.shadow.4*Point); lo.ma.p4.4=lo.ma.p4.3+(fib.SR.shadow.5*Point); lo.ma.p4.5=lo.ma.p4.4+(fib.SR.shadow.6*Point); lo.ma.p4.6=lo.ma.p4.5+(fib.SR.shadow.7*Point); double hi.ma.p4.1, hi.ma.p4.2, hi.ma.p4.3, hi.ma.p4.4, hi.ma.p4.5, hi.ma.p4.6; hi.ma.p4.1=hi.ma.p4-(fib.SR.shadow.2*Point); hi.ma.p4.2=hi.ma.p4.1-(fib.SR.shadow.3*Point); hi.ma.p4.3=hi.ma.p4.2-(fib.SR.shadow.4*Point); hi.ma.p4.4=hi.ma.p4.3-(fib.SR.shadow.5*Point); hi.ma.p4.5=hi.ma.p4.4-(fib.SR.shadow.6*Point); hi.ma.p4.6=hi.ma.p4.5-(fib.SR.shadow.7*Point); //p4 1st level (hi.1.p4, lo.1.p4) if(lo.ma.p4.1-hi.ma.p4.1>Ask-Bid) { ObjectCreate("lo.1.p4",OBJ_TREND,0,t1.p4, lo.ma.p4.1, t2.p4, lo.ma.p4.1); ObjectSet("lo.1.p4",OBJPROP_STYLE,STYLE_SOLID); ObjectSet("lo.1.p4",OBJPROP_WIDTH,2); ObjectSet("lo.1.p4",OBJPROP_RAY,false); ObjectSet("lo.1.p4",OBJPROP_COLOR,fib.SR.shadow.2.c); ObjectSetText("lo.1.p4",DoubleToStr(lo.ma.p4.1,Digits),7,"Arial",fib.SR.shadow.2.c); ObjectCreate("hi.1.p4",OBJ_TREND,0,t1.p4, hi.ma.p4.1, t2.p4, hi.ma.p4.1); ObjectSet("hi.1.p4",OBJPROP_STYLE,STYLE_SOLID); ObjectSet("hi.1.p4",OBJPROP_WIDTH,2); ObjectSet("hi.1.p4",OBJPROP_RAY,false); ObjectSet("hi.1.p4",OBJPROP_COLOR,fib.SR.shadow.2.c); ObjectSetText("hi.1.p4",DoubleToStr(hi.ma.p4.1,Digits),7,"Arial",fib.SR.shadow.2.c); } // 2st level (hi.2.p4, lo.2.p4) if(lo.ma.p4.2-hi.ma.p4.2>Ask-Bid) { ObjectCreate("lo.2.p4",OBJ_TREND,0,t1.p4, lo.ma.p4.2, t2.p4, lo.ma.p4.2); ObjectSet("lo.2.p4",OBJPROP_STYLE,STYLE_SOLID); ObjectSet("lo.2.p4",OBJPROP_WIDTH,2); ObjectSet("lo.2.p4",OBJPROP_RAY,false); ObjectSet("lo.2.p4",OBJPROP_COLOR,fib.SR.shadow.3.c); ObjectSetText("lo.2.p4",DoubleToStr(lo.ma.p4.2,Digits),7,"Arial",fib.SR.shadow.3.c); ObjectCreate("hi.2.p4",OBJ_TREND,0,t1.p4, hi.ma.p4.2, t2.p4, hi.ma.p4.2); ObjectSet("hi.2.p4",OBJPROP_STYLE,STYLE_SOLID); ObjectSet("hi.2.p4",OBJPROP_WIDTH,2); ObjectSet("hi.2.p4",OBJPROP_RAY,false); ObjectSet("hi.2.p4",OBJPROP_COLOR,fib.SR.shadow.3.c); ObjectSetText("hi.2.p4",DoubleToStr(hi.ma.p4.2,Digits),7,"Arial",fib.SR.shadow.3.c); } // 3rd level (hi.3.p4, lo.3.p4) if(lo.ma.p4.3-hi.ma.p4.3>Ask-Bid) { ObjectCreate("lo.3.p4",OBJ_TREND,0,t1.p4, lo.ma.p4.3, t2.p4, lo.ma.p4.3); ObjectSet("lo.3.p4",OBJPROP_STYLE,STYLE_SOLID); ObjectSet("lo.3.p4",OBJPROP_WIDTH,2); ObjectSet("lo.3.p4",OBJPROP_RAY,false); ObjectSet("lo.3.p4",OBJPROP_COLOR,fib.SR.shadow.4.c); ObjectSetText("lo.3.p4",DoubleToStr(lo.ma.p4.3,Digits),7,"Arial",fib.SR.shadow.4.c); ObjectCreate("hi.3.p4",OBJ_TREND,0,t1.p4, hi.ma.p4.3, t2.p4, hi.ma.p4.3); ObjectSet("hi.3.p4",OBJPROP_STYLE,STYLE_SOLID); ObjectSet("hi.3.p4",OBJPROP_WIDTH,2); ObjectSet("hi.3.p4",OBJPROP_RAY,false); ObjectSet("hi.3.p4",OBJPROP_COLOR,fib.SR.shadow.4.c); ObjectSetText("hi.3.p4",DoubleToStr(hi.ma.p4.3,Digits),7,"Arial",fib.SR.shadow.4.c); } // 4th level (hi.4.p4, lo.4.p4) if(lo.ma.p4.4-hi.ma.p4.4>Ask-Bid) { ObjectCreate("lo.4.p4",OBJ_TREND,0,t1.p4, lo.ma.p4.4, t2.p4, lo.ma.p4.4); ObjectSet("lo.4.p4",OBJPROP_STYLE,STYLE_SOLID); ObjectSet("lo.4.p4",OBJPROP_WIDTH,2); ObjectSet("lo.4.p4",OBJPROP_RAY,false); ObjectSet("lo.4.p4",OBJPROP_COLOR,fib.SR.shadow.5.c); ObjectSetText("lo.4.p4",DoubleToStr(lo.ma.p4.4,Digits),7,"Arial",fib.SR.shadow.5.c); ObjectCreate("hi.4.p4",OBJ_TREND,0,t1.p4, hi.ma.p4.4, t2.p4, hi.ma.p4.4); ObjectSet("hi.4.p4",OBJPROP_STYLE,STYLE_SOLID); ObjectSet("hi.4.p4",OBJPROP_WIDTH,2); ObjectSet("hi.4.p4",OBJPROP_RAY,false); ObjectSet("hi.4.p4",OBJPROP_COLOR,fib.SR.shadow.5.c); ObjectSetText("hi.4.p4",DoubleToStr(hi.ma.p4.4,Digits),7,"Arial",fib.SR.shadow.5.c); } // 5th level (hi.5.p4, lo.5.p4) if(lo.ma.p4.5-hi.ma.p4.5>Ask-Bid) { ObjectCreate("lo.5.p4",OBJ_TREND,0,t1.p4, lo.ma.p4.5, t2.p4, lo.ma.p4.5); ObjectSet("lo.5.p4",OBJPROP_STYLE,STYLE_SOLID); ObjectSet("lo.5.p4",OBJPROP_WIDTH,2); ObjectSet("lo.5.p4",OBJPROP_RAY,false); ObjectSet("lo.5.p4",OBJPROP_COLOR,fib.SR.shadow.6.c); ObjectSetText("lo.5.p4",DoubleToStr(lo.ma.p4.5,Digits),7,"Arial",fib.SR.shadow.6.c); ObjectCreate("hi.5.p4",OBJ_TREND,0,t1.p4, hi.ma.p4.5, t2.p4, hi.ma.p4.5); ObjectSet("hi.5.p4",OBJPROP_STYLE,STYLE_SOLID); ObjectSet("hi.5.p4",OBJPROP_WIDTH,2); ObjectSet("hi.5.p4",OBJPROP_RAY,false); ObjectSet("hi.5.p4",OBJPROP_COLOR,fib.SR.shadow.6.c); ObjectSetText("hi.5.p4",DoubleToStr(hi.ma.p4.5,Digits),7,"Arial",fib.SR.shadow.6.c); } // 6th level (hi.6.p4, lo.6.p4) if(lo.ma.p4.6-hi.ma.p4.6>Ask-Bid) { ObjectCreate("lo.6.p4",OBJ_TREND,0,t1.p4, lo.ma.p4.6, t2.p4, lo.ma.p4.6); ObjectSet("lo.6.p4",OBJPROP_STYLE,STYLE_SOLID); ObjectSet("lo.6.p4",OBJPROP_WIDTH,2); ObjectSet("lo.6.p4",OBJPROP_RAY,false); ObjectSet("lo.6.p4",OBJPROP_COLOR,fib.SR.shadow.7.c); ObjectSetText("lo.6.p4",DoubleToStr(lo.ma.p4.6,Digits),7,"Arial",fib.SR.shadow.7.c); ObjectCreate("hi.6.p4",OBJ_TREND,0,t1.p4, hi.ma.p4.6, t2.p4, hi.ma.p4.6); ObjectSet("hi.6.p4",OBJPROP_STYLE,STYLE_SOLID); ObjectSet("hi.6.p4",OBJPROP_WIDTH,2); ObjectSet("hi.6.p4",OBJPROP_RAY,false); ObjectSet("hi.6.p4",OBJPROP_COLOR,fib.SR.shadow.7.c); ObjectSetText("hi.6.p4",DoubleToStr(hi.ma.p4.6,Digits),7,"Arial",fib.SR.shadow.7.c); } //...............Moving Average Support & Resistance Levels.............................. string space=" "; // ObjectCreate("ma1.p4",OBJ_TEXT,0,t1.p4,ma1.p4);//13 ma ObjectSetText("ma1.p4",space+DoubleToStr(ma1.p4,Digits),8,"Arial",White); // ObjectCreate("ma2.p4",OBJ_TEXT,0,t1.p4,ma2.p4);//21 ma ObjectSetText("ma2.p4",space+DoubleToStr(ma2.p4,Digits),8,"Arial",White); // ObjectCreate("ma3.p4",OBJ_TEXT,0,t1.p4,ma3.p4);//34 ma if(Bid>ma3.p4) {ObjectSetText("ma3.p4",space+DoubleToStr(ma3.p4,Digits),8,"Arial",LightGreen);} if(Ask<ma3.p4) {ObjectSetText("ma3.p4",space+DoubleToStr(ma3.p4,Digits),8,"Arial",Pink);} if(Bid<=ma3.p4 && Ask>=ma3.p4) { ObjectSetText("ma3.p4",space+DoubleToStr(ma3.p4,Digits),8,"Arial",Yellow);} // ObjectCreate("ma4.p4",OBJ_TEXT,0,t1.p4,ma4.p4);//55 ma if(Bid>ma4.p4) {ObjectSetText("ma4.p4",space+DoubleToStr(ma4.p4,Digits),8,"Arial",LightGreen);} if(Ask<ma4.p4) {ObjectSetText("ma4.p4",space+DoubleToStr(ma4.p4,Digits),8,"Arial",Pink);} if(Bid<=ma4.p4 && Ask>=ma4.p4) { ObjectSetText("ma4.p4",space+DoubleToStr(ma4.p4,Digits),8,"Arial",Yellow);} // ObjectCreate("ma5.p4",OBJ_TEXT,0,t1.p4,ma5.p4);//89 ma if(Bid>ma5.p4) {ObjectSetText("ma5.p4",space+DoubleToStr(ma5.p4,Digits),8,"Arial",Green);} if(Ask<ma5.p4) {ObjectSetText("ma5.p4",space+DoubleToStr(ma5.p4,Digits),8,"Arial",Red);} if(Bid<=ma5.p4 && Ask>=ma5.p4) { ObjectSetText("ma5.p4",space+DoubleToStr(ma5.p4,Digits),8,"Arial",Yellow);} // ObjectCreate("ma6.p4",OBJ_TEXT,0,t1.p4,NormalizeDouble(ma6.p4,Digits));//144 ma if(Bid>ma6.p4) {ObjectSetText("ma6.p4",space+DoubleToStr(ma6.p4,Digits),8,"Arial",Green);} if(Ask<ma6.p4) {ObjectSetText("ma6.p4",space+DoubleToStr(ma6.p4,Digits),8,"Arial",Red);} if(Bid<=ma6.p4 && Ask>=ma6.p4) { ObjectSetText("ma6.p4",space+DoubleToStr(ma6.p4,Digits),8,"Arial",Yellow);} // ObjectCreate("ma7.p4",OBJ_TEXT,0,t1.p4,NormalizeDouble(ma7.p4,Digits));//233 ma if(Bid>ma7.p4) {ObjectSetText("ma7.p4",space+DoubleToStr(ma7.p4,Digits),8,"Arial",Green);} if(Ask<ma7.p4) {ObjectSetText("ma7.p4",space+DoubleToStr(ma7.p4,Digits),8,"Arial",Red);} if(Bid<=ma7.p4 && Ask>=ma7.p4) { ObjectSetText("ma7.p4",space+DoubleToStr(ma7.p4,Digits),8,"Arial",Yellow);} }//end p4.Fib.Plot() void column() { //..................Time Frame Columns................................................. //Addition - uses Psar of that timeframe to colour the lanes //Dull red-green psars are not with you //brighter red-green psar in your favour // because Psar appears with the new bar I thing i can use Bar 0 // for faster notification. //1st Column if(tmb1>rsxUpperTrigger) { ObjectCreate("up.p1",OBJ_RECTANGLE,0,t1.p1,Ask,t2.p1,Ask*1.5); ObjectSet("up.p1",OBJPROP_COLOR,LimeGreen); } else { ObjectCreate("up.p1",OBJ_RECTANGLE,0,t1.p1,Ask,t2.p1,Ask*1.5); ObjectSet("up.p1",OBJPROP_COLOR,DarkSlateGray); } if(tmr1<rsxLowerTrigger) { ObjectCreate("down.p1",OBJ_RECTANGLE,0,t1.p1,Bid,t2.p1,0); ObjectSet("down.p1",OBJPROP_COLOR,Red); } else { ObjectCreate("down.p1",OBJ_RECTANGLE,0,t1.p1,Bid,t2.p1,0); ObjectSet("down.p1",OBJPROP_COLOR,DarkSlateGray); } //2nd Column if(tmb2>rsxUpperTrigger) { ObjectCreate("up.p2",OBJ_RECTANGLE,0,t1.p2,Ask,t2.p2,Ask*1.5); ObjectSet("up.p2",OBJPROP_COLOR,LimeGreen); } else { ObjectCreate("up.p2",OBJ_RECTANGLE,0,t1.p2,Ask,t2.p2,Ask*1.5); ObjectSet("up.p2",OBJPROP_COLOR,DarkSlateGray); } if(tmr2<rsxLowerTrigger) { ObjectCreate("down.p2",OBJ_RECTANGLE,0,t1.p2,0,t2.p2,Bid); ObjectSet("down.p2",OBJPROP_COLOR,Red); } else { ObjectCreate("down.p2",OBJ_RECTANGLE,0,t1.p2,0,t2.p2,Bid); ObjectSet("down.p2",OBJPROP_COLOR,DarkSlateGray); } //3rd Column if(tmb3>rsxUpperTrigger) { ObjectCreate("up.p3",OBJ_RECTANGLE,0,t1.p3,Ask,t2.p3,Ask*1.5); ObjectSet("up.p3",OBJPROP_COLOR,LimeGreen); } else { ObjectCreate("up.p3",OBJ_RECTANGLE,0,t1.p3,Ask,t2.p3,Ask*1.5); ObjectSet("up.p3",OBJPROP_COLOR,DarkSlateGray); } if(tmr3<rsxLowerTrigger) { ObjectCreate("down.p3",OBJ_RECTANGLE,0,t1.p3,Bid,t2.p3,0); ObjectSet("down.p3",OBJPROP_COLOR,Red); } else { ObjectCreate("down.p3",OBJ_RECTANGLE,0,t1.p3,Bid,t2.p3,0); ObjectSet("down.p3",OBJPROP_COLOR,DarkSlateGray); } //4th column if(tmb4>rsxUpperTrigger) { ObjectCreate("up.p4",OBJ_RECTANGLE,0,t1.p4,Ask,t2.p4,Ask*1.5); ObjectSet("up.p4",OBJPROP_COLOR,LimeGreen); } else { ObjectCreate("up.p4",OBJ_RECTANGLE,0,t1.p4,Ask,t2.p4,Ask*1.5); ObjectSet("up.p4",OBJPROP_COLOR,DarkSlateGray); } if(tmr4<rsxLowerTrigger) { ObjectCreate("down.p4",OBJ_RECTANGLE,0,t1.p4,Bid,t2.p4,0); ObjectSet("down.p4",OBJPROP_COLOR,Red); } else { ObjectCreate("down.p4",OBJ_RECTANGLE,0,t1.p4,Bid,t2.p4,0); ObjectSet("down.p4",OBJPROP_COLOR,DarkSlateGray); } }//end Columns void Refresh() { if (Use_Std_Reg) { ObjectDelete("regression channel");ObjectDelete("std channel"); } ObjectDelete("up.p1"); ObjectDelete("down.p1"); ObjectDelete("lcf.p1"); ObjectDelete("hcf.p1"); ObjectDelete("ma1.p1"); ObjectDelete("lo.1.p1"); ObjectDelete("hi.1.p1"); ObjectDelete("ma2.p1"); ObjectDelete("lo.2.p1"); ObjectDelete("hi.2.p1"); ObjectDelete("ma3.p1"); ObjectDelete("lo.3.p1"); ObjectDelete("hi.3.p1"); ObjectDelete("ma4.p1"); ObjectDelete("lo.4.p1"); ObjectDelete("hi.4.p1"); ObjectDelete("ma5.p1"); ObjectDelete("lo.5.p1"); ObjectDelete("hi.5.p1"); ObjectDelete("ma6.p1"); ObjectDelete("lo.6.p1"); ObjectDelete("hi.6.p1"); ObjectDelete("ma7.p1"); ObjectDelete("lo.7.p1"); ObjectDelete("hi.7.p1"); ObjectDelete("up.p2"); ObjectDelete("down.p2"); ObjectDelete("lcf.p2"); ObjectDelete("hcf.p2"); ObjectDelete("ma1.p2"); ObjectDelete("lo.1.p2"); ObjectDelete("hi.1.p2"); ObjectDelete("ma2.p2"); ObjectDelete("lo.2.p2"); ObjectDelete("hi.2.p2"); ObjectDelete("ma3.p2"); ObjectDelete("lo.3.p2"); ObjectDelete("hi.3.p2"); ObjectDelete("ma4.p2"); ObjectDelete("lo.4.p2"); ObjectDelete("hi.4.p2"); ObjectDelete("ma5.p2"); ObjectDelete("lo.5.p2"); ObjectDelete("hi.5.p2"); ObjectDelete("ma6.p2"); ObjectDelete("lo.6.p2"); ObjectDelete("hi.6.p2"); ObjectDelete("ma7.p2"); ObjectDelete("lo.7.p2"); ObjectDelete("hi.7.p2"); ObjectDelete("up.p3"); ObjectDelete("down.p3"); ObjectDelete("lcf.p3"); ObjectDelete("hcf.p3"); ObjectDelete("ma1.p3"); ObjectDelete("lo.1.p3"); ObjectDelete("hi.1.p3"); ObjectDelete("ma2.p3"); ObjectDelete("lo.2.p3"); ObjectDelete("hi.2.p3"); ObjectDelete("ma3.p3"); ObjectDelete("lo.3.p3"); ObjectDelete("hi.3.p3"); ObjectDelete("ma4.p3"); ObjectDelete("lo.4.p3"); ObjectDelete("hi.4.p3"); ObjectDelete("ma5.p3"); ObjectDelete("lo.5.p3"); ObjectDelete("hi.5.p3"); ObjectDelete("ma6.p3"); ObjectDelete("lo.6.p3"); ObjectDelete("hi.6.p3"); ObjectDelete("ma7.p3"); ObjectDelete("lo.7.p3"); ObjectDelete("hi.7.p3"); ObjectDelete("up.p4"); ObjectDelete("down.p4"); ObjectDelete("lcf.p4"); ObjectDelete("hcf.p4"); ObjectDelete("ma1.p4"); ObjectDelete("lo.1.p4"); ObjectDelete("hi.1.p4"); ObjectDelete("ma2.p4"); ObjectDelete("lo.2.p4"); ObjectDelete("hi.2.p4"); ObjectDelete("ma3.p4"); ObjectDelete("lo.3.p4"); ObjectDelete("hi.3.p4"); ObjectDelete("ma4.p4"); ObjectDelete("lo.4.p4"); ObjectDelete("hi.4.p4"); ObjectDelete("ma5.p4"); ObjectDelete("lo.5.p4"); ObjectDelete("hi.5.p4"); ObjectDelete("ma6.p4"); ObjectDelete("lo.6.p4"); ObjectDelete("hi.6.p4"); ObjectDelete("ma7.p4"); ObjectDelete("lo.7.p4"); ObjectDelete("hi.7.p4");} //---- done

Indicatore MetaTrader 

//+------------------------------------------------------------------+ //| ADX.mq4 | //| Copyright © 2004, MetaQuotes Software Corp. | //| http://www.metaquotes.net/ | //+------------------------------------------------------------------+ #property copyright "Copyright © 2004, MetaQuotes Software Corp." #property link "http://www.metaquotes.net/" #property indicator_separate_window #property indicator_buffers 3 #property indicator_color1 Blue #property indicator_color2 Green #property indicator_color3 Red //---- input parameters extern int ADXPeriod=14; //---- buffers double ADXBuffer[]; double PlusDiBuffer[]; double MinusDiBuffer[]; double PlusSdiBuffer[]; double MinusSdiBuffer[]; double TempBuffer[]; //+------------------------------------------------------------------+ //| Custom indicator initialization function | //+------------------------------------------------------------------+ int init() { //---- 3 additional buffers are used for counting. IndicatorBuffers(6); //---- indicator buffers SetIndexBuffer(0,ADXBuffer); SetIndexBuffer(1,PlusDiBuffer); SetIndexBuffer(2,MinusDiBuffer); SetIndexBuffer(3,PlusSdiBuffer); SetIndexBuffer(4,MinusSdiBuffer); SetIndexBuffer(5,TempBuffer); //---- name for DataWindow and indicator subwindow label IndicatorShortName("ADX("+ADXPeriod+")"); SetIndexLabel(0,"ADX"); SetIndexLabel(1,"+DI"); SetIndexLabel(2,"-DI"); //---- SetIndexDrawBegin(0,ADXPeriod); SetIndexDrawBegin(1,ADXPeriod); SetIndexDrawBegin(2,ADXPeriod); //---- return(0); } //+------------------------------------------------------------------+ //| Average Directional Movement Index | //+------------------------------------------------------------------+ int start() { double pdm,mdm,tr; double price_high,price_low; int starti,i,counted_bars=IndicatorCounted(); //---- i=Bars-2; PlusSdiBuffer[i+1]=0; MinusSdiBuffer[i+1]=0; if(counted_bars>=i) i=Bars-counted_bars-1; starti=i; //---- while(i>=0) { price_low=Low[i]; price_high=High[i]; //---- pdm=price_high-High[i+1]; mdm=Low[i+1]-price_low; if(pdm<0) pdm=0; // +DM if(mdm<0) mdm=0; // -DM if(pdm==mdm) { pdm=0; mdm=0; } else if(pdm<mdm) pdm=0; else if(mdm<pdm) mdm=0; //---- âû÷èñëÿåì èñòèííûé èíòåðâàë double num1=MathAbs(price_high-price_low); double num2=MathAbs(price_high-Close[i+1]); double num3=MathAbs(price_low-Close[i+1]); tr=MathMax(num1,num2); tr=MathMax(tr,num3); //---- counting plus/minus direction if(tr==0) { PlusSdiBuffer[i]=0; MinusSdiBuffer[i]=0; } else { PlusSdiBuffer[i]=100.0*pdm/tr; MinusSdiBuffer[i]=100.0*mdm/tr; } //---- i--; } //---- last counted bar will be recounted if(counted_bars>0) counted_bars--; int limit=Bars-counted_bars; //---- apply EMA to +DI for(i=0; i<=limit; i++) PlusDiBuffer[i]=iMAOnArray(PlusSdiBuffer,Bars,ADXPeriod,0,MODE_EMA,i); //---- apply EMA to -DI for(i=0; i<=limit; i++) MinusDiBuffer[i]=iMAOnArray(MinusSdiBuffer,Bars,ADXPeriod,0,MODE_EMA,i); //---- Directional Movement (DX) i=Bars-2; TempBuffer[i+1]=0; i=starti; while(i>=0) { double div=MathAbs(PlusDiBuffer[i]+MinusDiBuffer[i]); if(div==0.00) TempBuffer[i]=0; else TempBuffer[i]=100*(MathAbs(PlusDiBuffer[i]-MinusDiBuffer[i])/div); i--; } //---- ADX is exponential moving average on DX for(i=0; i<limit; i++) ADXBuffer[i]=iMAOnArray(TempBuffer,Bars,ADXPeriod,0,MODE_EMA,i); //---- return(0); } //+------------------------------------------------------------------+
Indicatore MetaTrader //+------------------------------------------------------------------+ //| HMA.mq4 //| Copyright © 2006 WizardSerg <Questo indirizzo email è protetto dagli spambots. È necessario abilitare JavaScript per vederlo. document.getElementById('cloak53c068dd4c6af65a95f2eaca805fee01').innerHTML = ''; var prefix = 'ma' + 'il' + 'to'; var path = 'hr' + 'ef' + '='; var addy53c068dd4c6af65a95f2eaca805fee01 = 'wizardserg' + '@'; addy53c068dd4c6af65a95f2eaca805fee01 = addy53c068dd4c6af65a95f2eaca805fee01 + 'mail' + '.' + 'ru'; var addy_text53c068dd4c6af65a95f2eaca805fee01 = 'wizardserg' + '@' + 'mail' + '.' + 'ru';document.getElementById('cloak53c068dd4c6af65a95f2eaca805fee01').innerHTML += ''+addy_text53c068dd4c6af65a95f2eaca805fee01+''; >, ?? ??????? ForexMagazine #104 //| Questo indirizzo email è protetto dagli spambots. È necessario abilitare JavaScript per vederlo. document.getElementById('cloak679fe07b4fdd02af4130c90a15e10829').innerHTML = ''; var prefix = 'ma' + 'il' + 'to'; var path = 'hr' + 'ef' + '='; var addy679fe07b4fdd02af4130c90a15e10829 = 'wizardserg' + '@'; addy679fe07b4fdd02af4130c90a15e10829 = addy679fe07b4fdd02af4130c90a15e10829 + 'mail' + '.' + 'ru'; var addy_text679fe07b4fdd02af4130c90a15e10829 = 'wizardserg' + '@' + 'mail' + '.' + 'ru';document.getElementById('cloak679fe07b4fdd02af4130c90a15e10829').innerHTML += ''+addy_text679fe07b4fdd02af4130c90a15e10829+''; //| Revised by IgorAD,Questo indirizzo email è protetto dagli spambots. È necessario abilitare JavaScript per vederlo. document.getElementById('cloak1fee3bcb427fa98cdc7b92b3162c64ce').innerHTML = ''; var prefix = 'ma' + 'il' + 'to'; var path = 'hr' + 'ef' + '='; var addy1fee3bcb427fa98cdc7b92b3162c64ce = 'igorad2003' + '@'; addy1fee3bcb427fa98cdc7b92b3162c64ce = addy1fee3bcb427fa98cdc7b92b3162c64ce + 'yahoo' + '.' + 'co' + '.' + 'uk'; var addy_text1fee3bcb427fa98cdc7b92b3162c64ce = 'igorad2003' + '@' + 'yahoo' + '.' + 'co' + '.' + 'uk';document.getElementById('cloak1fee3bcb427fa98cdc7b92b3162c64ce').innerHTML += ''+addy_text1fee3bcb427fa98cdc7b92b3162c64ce+''; | //| Personalized by iGoR AKA FXiGoR for the Trend Slope Trading method (T_S_T) //| Link: //| contact: Questo indirizzo email è protetto dagli spambots. È necessario abilitare JavaScript per vederlo. document.getElementById('cloak5bede979505445dc07e612ea7e49a671').innerHTML = ''; var prefix = 'ma' + 'il' + 'to'; var path = 'hr' + 'ef' + '='; var addy5bede979505445dc07e612ea7e49a671 = 'thefuturemaster' + '@'; addy5bede979505445dc07e612ea7e49a671 = addy5bede979505445dc07e612ea7e49a671 + 'hotmail' + '.' + 'com'; var addy_text5bede979505445dc07e612ea7e49a671 = 'thefuturemaster' + '@' + 'hotmail' + '.' + 'com';document.getElementById('cloak5bede979505445dc07e612ea7e49a671').innerHTML += ''+addy_text5bede979505445dc07e612ea7e49a671+''; //+------------------------------------------------------------------+ #property copyright "MT4 release WizardSerg <Questo indirizzo email è protetto dagli spambots. È necessario abilitare JavaScript per vederlo. document.getElementById('cloak83af91f91019bf82e747ae6af9ee8954').innerHTML = ''; var prefix = 'ma' + 'il' + 'to'; var path = 'hr' + 'ef' + '='; var addy83af91f91019bf82e747ae6af9ee8954 = 'wizardserg' + '@'; addy83af91f91019bf82e747ae6af9ee8954 = addy83af91f91019bf82e747ae6af9ee8954 + 'mail' + '.' + 'ru'; var addy_text83af91f91019bf82e747ae6af9ee8954 = 'wizardserg' + '@' + 'mail' + '.' + 'ru';document.getElementById('cloak83af91f91019bf82e747ae6af9ee8954').innerHTML += ''+addy_text83af91f91019bf82e747ae6af9ee8954+''; >, ?? ??????? ForexMagazine #104" #property link "Questo indirizzo email è protetto dagli spambots. È necessario abilitare JavaScript per vederlo. document.getElementById('cloak55dca81074f252892efd6e4806f497b7').innerHTML = ''; var prefix = 'ma' + 'il' + 'to'; var path = 'hr' + 'ef' + '='; var addy55dca81074f252892efd6e4806f497b7 = 'wizardserg' + '@'; addy55dca81074f252892efd6e4806f497b7 = addy55dca81074f252892efd6e4806f497b7 + 'mail' + '.' + 'ru'; var addy_text55dca81074f252892efd6e4806f497b7 = 'wizardserg' + '@' + 'mail' + '.' + 'ru';document.getElementById('cloak55dca81074f252892efd6e4806f497b7').innerHTML += ''+addy_text55dca81074f252892efd6e4806f497b7+''; " #property indicator_chart_window #property indicator_buffers 2 #property indicator_color1 LightBlue #property indicator_color2 Tomato //---- input parameters extern int period=80; extern int method=3; // MODE_SMA extern int price=0; // PRICE_CLOSE //---- buffers double Uptrend[]; double Dntrend[]; double ExtMapBuffer[]; //+------------------------------------------------------------------+ //| Custom indicator initialization function | //+------------------------------------------------------------------+ int init() { IndicatorBuffers(3); SetIndexBuffer(0, Uptrend); //ArraySetAsSeries(Uptrend, true); SetIndexBuffer(1, Dntrend); //ArraySetAsSeries(Dntrend, true); SetIndexBuffer(2, ExtMapBuffer); ArraySetAsSeries(ExtMapBuffer, true); SetIndexStyle(0,DRAW_LINE,STYLE_SOLID,2); SetIndexStyle(1,DRAW_LINE,STYLE_SOLID,2); IndicatorShortName("Slope Direction Line("+period+")"); return(0); } //+------------------------------------------------------------------+ //| Custor indicator deinitialization function | //+------------------------------------------------------------------+ int deinit() { // ???? ????? ?????? ?????? return(0); } //+------------------------------------------------------------------+ //| ?????????? ??????? | //+------------------------------------------------------------------+ double WMA(int x, int p) { return(iMA(NULL, 0, p, 0, method, price, x)); } //+------------------------------------------------------------------+ //| Custom indicator iteration function | //+------------------------------------------------------------------+ int start() { int counted_bars = IndicatorCounted(); if(counted_bars < 0) return(-1); int x = 0; int p = MathSqrt(period); int e = Bars - counted_bars + period + 1; double vect[], trend[]; if(e > Bars) e = Bars; ArrayResize(vect, e); ArraySetAsSeries(vect, true); ArrayResize(trend, e); ArraySetAsSeries(trend, true); for(x = 0; x < e; x++) { vect[x] = 2*WMA(x, period/2) - WMA(x, period); // Print("Bar date/time: ", TimeToStr(Time[x]), " close: ", Close[x], " vect[", x, "] = ", vect[x], " 2*WMA(p/2) = ", 2*WMA(x, period/2), " WMA(p) = ", WMA(x, period)); } for(x = 0; x < e-period; x++) ExtMapBuffer[x] = iMAOnArray(vect, 0, p, 0, method, x); for(x = e-period; x >= 0; x--) { trend[x] = trend[x+1]; if (ExtMapBuffer[x]> ExtMapBuffer[x+1]) trend[x] =1; if (ExtMapBuffer[x]< ExtMapBuffer[x+1]) trend[x] =-1; if (trend[x]>0) { Uptrend[x] = ExtMapBuffer[x]; if (trend[x+1]<0) Uptrend[x+1]=ExtMapBuffer[x+1]; Dntrend[x] = EMPTY_VALUE; } else if (trend[x]<0) { Dntrend[x] = ExtMapBuffer[x]; if (trend[x+1]>0) Dntrend[x+1]=ExtMapBuffer[x+1]; Uptrend[x] = EMPTY_VALUE; } //Print( " trend=",trend[x]); } return(0); } //+------------------------------------------------------------------+
Indicatore MetaTrader //+------------------------------------------------------------------+ //| HMA.mq4 //| Copyright © 2006 WizardSerg <Questo indirizzo email è protetto dagli spambots. È necessario abilitare JavaScript per vederlo. document.getElementById('cloakd5cdca566c24e860e9b5dde67f471b5d').innerHTML = ''; var prefix = 'ma' + 'il' + 'to'; var path = 'hr' + 'ef' + '='; var addyd5cdca566c24e860e9b5dde67f471b5d = 'wizardserg' + '@'; addyd5cdca566c24e860e9b5dde67f471b5d = addyd5cdca566c24e860e9b5dde67f471b5d + 'mail' + '.' + 'ru'; var addy_textd5cdca566c24e860e9b5dde67f471b5d = 'wizardserg' + '@' + 'mail' + '.' + 'ru';document.getElementById('cloakd5cdca566c24e860e9b5dde67f471b5d').innerHTML += ''+addy_textd5cdca566c24e860e9b5dde67f471b5d+''; >, ?? ??????? ForexMagazine #104 //| Questo indirizzo email è protetto dagli spambots. È necessario abilitare JavaScript per vederlo. document.getElementById('cloakd9ad417900508402a40c9bf0bdcea64d').innerHTML = ''; var prefix = 'ma' + 'il' + 'to'; var path = 'hr' + 'ef' + '='; var addyd9ad417900508402a40c9bf0bdcea64d = 'wizardserg' + '@'; addyd9ad417900508402a40c9bf0bdcea64d = addyd9ad417900508402a40c9bf0bdcea64d + 'mail' + '.' + 'ru'; var addy_textd9ad417900508402a40c9bf0bdcea64d = 'wizardserg' + '@' + 'mail' + '.' + 'ru';document.getElementById('cloakd9ad417900508402a40c9bf0bdcea64d').innerHTML += ''+addy_textd9ad417900508402a40c9bf0bdcea64d+''; //| Revised by IgorAD,Questo indirizzo email è protetto dagli spambots. È necessario abilitare JavaScript per vederlo. document.getElementById('cloakdd11334d8f00bc6d4f06ec941850ecc2').innerHTML = ''; var prefix = 'ma' + 'il' + 'to'; var path = 'hr' + 'ef' + '='; var addydd11334d8f00bc6d4f06ec941850ecc2 = 'igorad2003' + '@'; addydd11334d8f00bc6d4f06ec941850ecc2 = addydd11334d8f00bc6d4f06ec941850ecc2 + 'yahoo' + '.' + 'co' + '.' + 'uk'; var addy_textdd11334d8f00bc6d4f06ec941850ecc2 = 'igorad2003' + '@' + 'yahoo' + '.' + 'co' + '.' + 'uk';document.getElementById('cloakdd11334d8f00bc6d4f06ec941850ecc2').innerHTML += ''+addy_textdd11334d8f00bc6d4f06ec941850ecc2+''; | //| Personalized by iGoR AKA FXiGoR for the Trend Slope Trading method (T_S_T) //| Link: //| contact: Questo indirizzo email è protetto dagli spambots. È necessario abilitare JavaScript per vederlo. document.getElementById('cloak08375b7105547795fcf738c1fc92b12a').innerHTML = ''; var prefix = 'ma' + 'il' + 'to'; var path = 'hr' + 'ef' + '='; var addy08375b7105547795fcf738c1fc92b12a = 'thefuturemaster' + '@'; addy08375b7105547795fcf738c1fc92b12a = addy08375b7105547795fcf738c1fc92b12a + 'hotmail' + '.' + 'com'; var addy_text08375b7105547795fcf738c1fc92b12a = 'thefuturemaster' + '@' + 'hotmail' + '.' + 'com';document.getElementById('cloak08375b7105547795fcf738c1fc92b12a').innerHTML += ''+addy_text08375b7105547795fcf738c1fc92b12a+''; //+------------------------------------------------------------------+ #property copyright "MT4 release WizardSerg <Questo indirizzo email è protetto dagli spambots. È necessario abilitare JavaScript per vederlo. document.getElementById('cloak099a3914d7f3772b741e03592eb4e415').innerHTML = ''; var prefix = 'ma' + 'il' + 'to'; var path = 'hr' + 'ef' + '='; var addy099a3914d7f3772b741e03592eb4e415 = 'wizardserg' + '@'; addy099a3914d7f3772b741e03592eb4e415 = addy099a3914d7f3772b741e03592eb4e415 + 'mail' + '.' + 'ru'; var addy_text099a3914d7f3772b741e03592eb4e415 = 'wizardserg' + '@' + 'mail' + '.' + 'ru';document.getElementById('cloak099a3914d7f3772b741e03592eb4e415').innerHTML += ''+addy_text099a3914d7f3772b741e03592eb4e415+''; >, ?? ??????? ForexMagazine #104" #property link "Questo indirizzo email è protetto dagli spambots. È necessario abilitare JavaScript per vederlo. document.getElementById('cloak3a4e9ac24d9dbc87df45c797fc6712c0').innerHTML = ''; var prefix = 'ma' + 'il' + 'to'; var path = 'hr' + 'ef' + '='; var addy3a4e9ac24d9dbc87df45c797fc6712c0 = 'wizardserg' + '@'; addy3a4e9ac24d9dbc87df45c797fc6712c0 = addy3a4e9ac24d9dbc87df45c797fc6712c0 + 'mail' + '.' + 'ru'; var addy_text3a4e9ac24d9dbc87df45c797fc6712c0 = 'wizardserg' + '@' + 'mail' + '.' + 'ru';document.getElementById('cloak3a4e9ac24d9dbc87df45c797fc6712c0').innerHTML += ''+addy_text3a4e9ac24d9dbc87df45c797fc6712c0+''; " #property indicator_chart_window #property indicator_buffers 2 #property indicator_color1 Lime #property indicator_color2 Red //---- input parameters extern int period=15; extern int method=3; // MODE_SMA extern int price=0; // PRICE_CLOSE //---- buffers double Uptrend[]; double Dntrend[]; double ExtMapBuffer[]; //+------------------------------------------------------------------+ //| Custom indicator initialization function | //+------------------------------------------------------------------+ int init() { IndicatorBuffers(3); SetIndexBuffer(0, Uptrend); //ArraySetAsSeries(Uptrend, true); SetIndexBuffer(1, Dntrend); //ArraySetAsSeries(Dntrend, true); SetIndexBuffer(2, ExtMapBuffer); ArraySetAsSeries(ExtMapBuffer, true); SetIndexStyle(0,DRAW_LINE,STYLE_SOLID,2); SetIndexStyle(1,DRAW_LINE,STYLE_SOLID,2); IndicatorShortName("Signal Line("+period+")"); return(0); } //+------------------------------------------------------------------+ //| Custor indicator deinitialization function | //+------------------------------------------------------------------+ int deinit() { // ???? ????? ?????? ?????? return(0); } //+------------------------------------------------------------------+ //| ?????????? ??????? | //+------------------------------------------------------------------+ double WMA(int x, int p) { return(iMA(NULL, 0, p, 0, method, price, x)); } //+------------------------------------------------------------------+ //| Custom indicator iteration function | //+------------------------------------------------------------------+ int start() { int counted_bars = IndicatorCounted(); if(counted_bars < 0) return(-1); int x = 0; int p = MathSqrt(period); int e = Bars - counted_bars + period + 1; double vect[], trend[]; if(e > Bars) e = Bars; ArrayResize(vect, e); ArraySetAsSeries(vect, true); ArrayResize(trend, e); ArraySetAsSeries(trend, true); for(x = 0; x < e; x++) { vect[x] = 2*WMA(x, period/2) - WMA(x, period); // Print("Bar date/time: ", TimeToStr(Time[x]), " close: ", Close[x], " vect[", x, "] = ", vect[x], " 2*WMA(p/2) = ", 2*WMA(x, period/2), " WMA(p) = ", WMA(x, period)); } for(x = 0; x < e-period; x++) ExtMapBuffer[x] = iMAOnArray(vect, 0, p, 0, method, x); for(x = e-period; x >= 0; x--) { trend[x] = trend[x+1]; if (ExtMapBuffer[x]> ExtMapBuffer[x+1]) trend[x] =1; if (ExtMapBuffer[x]< ExtMapBuffer[x+1]) trend[x] =-1; if (trend[x]>0) { Uptrend[x] = ExtMapBuffer[x]; if (trend[x+1]<0) Uptrend[x+1]=ExtMapBuffer[x+1]; Dntrend[x] = EMPTY_VALUE; } else if (trend[x]<0) { Dntrend[x] = ExtMapBuffer[x]; if (trend[x+1]>0) Dntrend[x+1]=ExtMapBuffer[x+1]; Uptrend[x] = EMPTY_VALUE; } //Print( " trend=",trend[x]); } return(0); } //+------------------------------------------------------------------+
Indicatore MetaTrader //+------------------------------------------------------------------+ //| HMA.mq4 //| Copyright © 2006 WizardSerg <Questo indirizzo email è protetto dagli spambots. È necessario abilitare JavaScript per vederlo. document.getElementById('cloak0c45a4c406b0c43b1fca5a677a38512f').innerHTML = ''; var prefix = 'ma' + 'il' + 'to'; var path = 'hr' + 'ef' + '='; var addy0c45a4c406b0c43b1fca5a677a38512f = 'wizardserg' + '@'; addy0c45a4c406b0c43b1fca5a677a38512f = addy0c45a4c406b0c43b1fca5a677a38512f + 'mail' + '.' + 'ru'; var addy_text0c45a4c406b0c43b1fca5a677a38512f = 'wizardserg' + '@' + 'mail' + '.' + 'ru';document.getElementById('cloak0c45a4c406b0c43b1fca5a677a38512f').innerHTML += ''+addy_text0c45a4c406b0c43b1fca5a677a38512f+''; >, ?? ??????? ForexMagazine #104 //| Questo indirizzo email è protetto dagli spambots. È necessario abilitare JavaScript per vederlo. document.getElementById('cloak8a783f8ca4a02579e5715c7d132f03c2').innerHTML = ''; var prefix = 'ma' + 'il' + 'to'; var path = 'hr' + 'ef' + '='; var addy8a783f8ca4a02579e5715c7d132f03c2 = 'wizardserg' + '@'; addy8a783f8ca4a02579e5715c7d132f03c2 = addy8a783f8ca4a02579e5715c7d132f03c2 + 'mail' + '.' + 'ru'; var addy_text8a783f8ca4a02579e5715c7d132f03c2 = 'wizardserg' + '@' + 'mail' + '.' + 'ru';document.getElementById('cloak8a783f8ca4a02579e5715c7d132f03c2').innerHTML += ''+addy_text8a783f8ca4a02579e5715c7d132f03c2+''; //| Revised by IgorAD,Questo indirizzo email è protetto dagli spambots. È necessario abilitare JavaScript per vederlo. document.getElementById('cloak5046a43fe9ca17fe94c3f5f190407066').innerHTML = ''; var prefix = 'ma' + 'il' + 'to'; var path = 'hr' + 'ef' + '='; var addy5046a43fe9ca17fe94c3f5f190407066 = 'igorad2003' + '@'; addy5046a43fe9ca17fe94c3f5f190407066 = addy5046a43fe9ca17fe94c3f5f190407066 + 'yahoo' + '.' + 'co' + '.' + 'uk'; var addy_text5046a43fe9ca17fe94c3f5f190407066 = 'igorad2003' + '@' + 'yahoo' + '.' + 'co' + '.' + 'uk';document.getElementById('cloak5046a43fe9ca17fe94c3f5f190407066').innerHTML += ''+addy_text5046a43fe9ca17fe94c3f5f190407066+''; | //| //| Personalized by iGoR AKA FXiGoR for the Trend Slope Trading method (T_S_T) //| Link: //| contact: Questo indirizzo email è protetto dagli spambots. È necessario abilitare JavaScript per vederlo. document.getElementById('cloak05eea01077f53ce3a4bcb90087bd9aad').innerHTML = ''; var prefix = 'ma' + 'il' + 'to'; var path = 'hr' + 'ef' + '='; var addy05eea01077f53ce3a4bcb90087bd9aad = 'thefuturemaster' + '@'; addy05eea01077f53ce3a4bcb90087bd9aad = addy05eea01077f53ce3a4bcb90087bd9aad + 'hotmail' + '.' + 'com'; var addy_text05eea01077f53ce3a4bcb90087bd9aad = 'thefuturemaster' + '@' + 'hotmail' + '.' + 'com';document.getElementById('cloak05eea01077f53ce3a4bcb90087bd9aad').innerHTML += ''+addy_text05eea01077f53ce3a4bcb90087bd9aad+''; //+------------------------------------------------------------------+ #property copyright "MT4 release WizardSerg <Questo indirizzo email è protetto dagli spambots. È necessario abilitare JavaScript per vederlo. document.getElementById('cloakde5d7beb84fdfbf17a3ae2cf3af86587').innerHTML = ''; var prefix = 'ma' + 'il' + 'to'; var path = 'hr' + 'ef' + '='; var addyde5d7beb84fdfbf17a3ae2cf3af86587 = 'wizardserg' + '@'; addyde5d7beb84fdfbf17a3ae2cf3af86587 = addyde5d7beb84fdfbf17a3ae2cf3af86587 + 'mail' + '.' + 'ru'; var addy_textde5d7beb84fdfbf17a3ae2cf3af86587 = 'wizardserg' + '@' + 'mail' + '.' + 'ru';document.getElementById('cloakde5d7beb84fdfbf17a3ae2cf3af86587').innerHTML += ''+addy_textde5d7beb84fdfbf17a3ae2cf3af86587+''; >, ?? ??????? ForexMagazine #104" #property link "Questo indirizzo email è protetto dagli spambots. È necessario abilitare JavaScript per vederlo. document.getElementById('cloak4f598ae216b1e34c80e1e98be9d0e119').innerHTML = ''; var prefix = 'ma' + 'il' + 'to'; var path = 'hr' + 'ef' + '='; var addy4f598ae216b1e34c80e1e98be9d0e119 = 'wizardserg' + '@'; addy4f598ae216b1e34c80e1e98be9d0e119 = addy4f598ae216b1e34c80e1e98be9d0e119 + 'mail' + '.' + 'ru'; var addy_text4f598ae216b1e34c80e1e98be9d0e119 = 'wizardserg' + '@' + 'mail' + '.' + 'ru';document.getElementById('cloak4f598ae216b1e34c80e1e98be9d0e119').innerHTML += ''+addy_text4f598ae216b1e34c80e1e98be9d0e119+''; " #property indicator_chart_window #property indicator_buffers 2 #property indicator_color1 Yellow #property indicator_color2 Magenta //---- input parameters extern int period=5; extern int method=3; // MODE_SMA extern int price=0; // PRICE_CLOSE //---- buffers double Uptrend[]; double Dntrend[]; double ExtMapBuffer[]; //+------------------------------------------------------------------+ //| Custom indicator initialization function | //+------------------------------------------------------------------+ int init() { IndicatorBuffers(3); SetIndexBuffer(0, Uptrend); //ArraySetAsSeries(Uptrend, true); SetIndexBuffer(1, Dntrend); //ArraySetAsSeries(Dntrend, true); SetIndexBuffer(2, ExtMapBuffer); ArraySetAsSeries(ExtMapBuffer, true); SetIndexStyle(0,DRAW_LINE,STYLE_SOLID,2); SetIndexStyle(1,DRAW_LINE,STYLE_SOLID,2); IndicatorShortName("Execute Line("+period+")"); return(0); } //+------------------------------------------------------------------+ //| Custor indicator deinitialization function | //+------------------------------------------------------------------+ int deinit() { // ???? ????? ?????? ?????? return(0); } //+------------------------------------------------------------------+ //| ?????????? ??????? | //+------------------------------------------------------------------+ double WMA(int x, int p) { return(iMA(NULL, 0, p, 0, method, price, x)); } //+------------------------------------------------------------------+ //| Custom indicator iteration function | //+------------------------------------------------------------------+ int start() { int counted_bars = IndicatorCounted(); if(counted_bars < 0) return(-1); int x = 0; int p = MathSqrt(period); int e = Bars - counted_bars + period + 1; double vect[], trend[]; if(e > Bars) e = Bars; ArrayResize(vect, e); ArraySetAsSeries(vect, true); ArrayResize(trend, e); ArraySetAsSeries(trend, true); for(x = 0; x < e; x++) { vect[x] = 2*WMA(x, period/2) - WMA(x, period); // Print("Bar date/time: ", TimeToStr(Time[x]), " close: ", Close[x], " vect[", x, "] = ", vect[x], " 2*WMA(p/2) = ", 2*WMA(x, period/2), " WMA(p) = ", WMA(x, period)); } for(x = 0; x < e-period; x++) ExtMapBuffer[x] = iMAOnArray(vect, 0, p, 0, method, x); for(x = e-period; x >= 0; x--) { trend[x] = trend[x+1]; if (ExtMapBuffer[x]> ExtMapBuffer[x+1]) trend[x] =1; if (ExtMapBuffer[x]< ExtMapBuffer[x+1]) trend[x] =-1; if (trend[x]>0) { Uptrend[x] = ExtMapBuffer[x]; if (trend[x+1]<0) Uptrend[x+1]=ExtMapBuffer[x+1]; Dntrend[x] = EMPTY_VALUE; } else if (trend[x]<0) { Dntrend[x] = ExtMapBuffer[x]; if (trend[x+1]>0) Dntrend[x+1]=ExtMapBuffer[x+1]; Uptrend[x] = EMPTY_VALUE; } //Print( " trend=",trend[x]); } return(0); } //+------------------------------------------------------------------+
Indicatore MetaTrader //+------------------------------------------------------------------+ //| (T_S_R)-Daily Range Calculator v1.3.mq4 | //| Copyright © 2006, Ogeima | //| Questo indirizzo email è protetto dagli spambots. È necessario abilitare JavaScript per vederlo. document.getElementById('cloak9c0e5e86bdf3937eb9ef88b460aeb1cf').innerHTML = ''; var prefix = 'ma' + 'il' + 'to'; var path = 'hr' + 'ef' + '='; var addy9c0e5e86bdf3937eb9ef88b460aeb1cf = 'ph_bresson' + '@'; addy9c0e5e86bdf3937eb9ef88b460aeb1cf = addy9c0e5e86bdf3937eb9ef88b460aeb1cf + 'yahoo' + '.' + 'com'; var addy_text9c0e5e86bdf3937eb9ef88b460aeb1cf = 'ph_bresson' + '@' + 'yahoo' + '.' + 'com';document.getElementById('cloak9c0e5e86bdf3937eb9ef88b460aeb1cf').innerHTML += ''+addy_text9c0e5e86bdf3937eb9ef88b460aeb1cf+''; //|Made for the TSR (Trend Slope Retracement) system by FXiGoR | //|http://strategybuilderfx.com/showthread.php?t=17252 | //+------------------------------------------------------------------+ // For basic explanations, see the notes at the end this script. // For information regarding the T_S_R method, read the "FXiGoR-(T_S_R) very effective Trend Slope Retracement system" thread opened by iGoR at StrategyBuilderfx, Forex-tsd, MoneyTec, ForexFactory or Trade2Win. #property copyright "Copyright © 2006, Ogeima" #property link "Questo indirizzo email è protetto dagli spambots. È necessario abilitare JavaScript per vederlo. document.getElementById('cloakc5fbe0b6d7dbadd454453888014a4150').innerHTML = ''; var prefix = 'ma' + 'il' + 'to'; var path = 'hr' + 'ef' + '='; var addyc5fbe0b6d7dbadd454453888014a4150 = 'ph_bresson' + '@'; addyc5fbe0b6d7dbadd454453888014a4150 = addyc5fbe0b6d7dbadd454453888014a4150 + 'yahoo' + '.' + 'com'; var addy_textc5fbe0b6d7dbadd454453888014a4150 = 'ph_bresson' + '@' + 'yahoo' + '.' + 'com';document.getElementById('cloakc5fbe0b6d7dbadd454453888014a4150').innerHTML += ''+addy_textc5fbe0b6d7dbadd454453888014a4150+''; " #property indicator_chart_window #property indicator_buffers 2 #property indicator_color1 Green #property indicator_color2 Red //---- input parameters extern double Risk_to_Reward_ratio = 3.0; double aSL_Long[]; double aSL_Short[]; int nDigits; //+------------------------------------------------------------------+ //| Custom indicator initialization function | //+------------------------------------------------------------------+ int init() { IndicatorBuffers(2); SetIndexStyle(0,DRAW_LINE,STYLE_SOLID,3); SetIndexStyle(1,DRAW_LINE,STYLE_SOLID,3); SetIndexBuffer(0,aSL_Long); SetIndexBuffer(1,aSL_Short); SetIndexEmptyValue(0,EMPTY_VALUE); SetIndexEmptyValue(1,EMPTY_VALUE); if(Symbol()=="GBPJPY" || Symbol()=="EURJPY" || Symbol()=="USDJPY" || Symbol()=="CHFJPY" || Symbol()=="GOLD" || Symbol()=="_SP500") nDigits = 2; else nDigits = 4; return(0); } //+------------------------------------------------------------------+ //| Custom indicator deinitialization function | //+------------------------------------------------------------------+ int deinit() { Comment(""); return(0); } //+------------------------------------------------------------------+ //| Custom indicator iteration function | //+------------------------------------------------------------------+ int start() { int R1=0,R5=0,R10=0,R20=0,RAvg=0; int RoomUp=0,RoomDown=0,StopLoss_Long=0,StopLoss_Short=0; double SL_Long=0,SL_Short=0; double low0=0,high0=0; string Text=""; int i=0; R1 = (iHigh(NULL,PERIOD_D1,1)-iLow(NULL,PERIOD_D1,1))/Point; for(i=1;i<=5;i++) R5 = R5 + (iHigh(NULL,PERIOD_D1,i)-iLow(NULL,PERIOD_D1,i))/Point; for(i=1;i<=10;i++) R10 = R10 + (iHigh(NULL,PERIOD_D1,i)-iLow(NULL,PERIOD_D1,i))/Point; for(i=1;i<=20;i++) R20 = R20 + (iHigh(NULL,PERIOD_D1,i)-iLow(NULL,PERIOD_D1,i))/Point; R5 = R5/5; R10 = R10/10; R20 = R20/20; RAvg = (R5+R10+R20)/3; low0 = iLow(NULL,PERIOD_D1,0); high0 = iHigh(NULL,PERIOD_D1,0); RoomUp = RAvg - (Bid - low0)/Point; RoomDown = RAvg - (high0 - Bid)/Point; StopLoss_Long = RoomUp/Risk_to_Reward_ratio; SL_Long = Bid - StopLoss_Long*Point; StopLoss_Short = RoomDown/Risk_to_Reward_ratio; SL_Short = Bid + StopLoss_Short*Point; Text = "Average Day Range: " + RAvg + "\n" + "Prev 01 Day Range: " + R1 + "\n" + "Prev 05 Days Range: " + R5 + "\n" + "Prev 10 Days Range: " + R10 + "\n" + "Prev 20 Days Range: " + R20 + "\n"; Text = Text + "Room Up: " + RoomUp + "\n" + "Room Down: " + RoomDown + "\n" + "Max. StopLosses should be :" + "\n" + "Long: " + StopLoss_Long + " Pips at " + DoubleToStr(SL_Long,nDigits) + "\n" + "Short: " + StopLoss_Short + " Pips at " + DoubleToStr(SL_Short,nDigits) + "\n"; Comment(Text); //-- SL Lines int limit; int counted_bars=IndicatorCounted(); if(counted_bars<0) counted_bars=0; if(counted_bars>0) counted_bars--; limit = counted_bars; for(i = 0 ;i <= limit ;i++) { if(i==0 || i==1 || i==2) { aSL_Long[i] = SL_Long; aSL_Short[i]= SL_Short; } else { aSL_Long[i] = EMPTY_VALUE; aSL_Short[i]= EMPTY_VALUE; } } return(0); } //+------------------------------------------------------------------+ /* Here's a little "indicator" that does some basic calculations for us. Let's look at what it does: It computes yesterday's range, the previous 5, 10 and 20 days ranges. And it calculates the "Average Day Range" of these four ranges (yesterday's+ Prev 5 Day Range + Prev 10 Day Range + Prev 20 Day Range)/4. So, if yesterday's Day Range was 80, the Previous 5 Day Range was 110, the Previous 10 Day Range was 90 and the Previous 20 Day Range was 120, then the Average Day Range would be 100. Then there's "Room Up" and "Room Down". Let's imagine today's low is (so far) 1000 and today's high is (so far) 1050. At this moment the price is 1020. So we're 1020-1000= 20 pips above the low, there is therefore 100-20=80 pips "left" up. For a risk-to-reward ratio of (say) 3, if a long trade was to be entered now, the stop loss should be no more than 80/3=26pips away, that is at 1020-26=994. So, if all conditions are met, we ll look for a "bottom" no lower than 994. Same thing for a short trade: we are 1050-1020= 30 pips below the high, there is therefore 100-30=70 pips "left" down. For a risk-to-reward ratio of 3, if a short trade was to be entered now, the stop loss should be no more than 70/3=23pips away, that is at 1020+23=1043. So, if all conditions are met, we ll look for a "top" no higher than 1043. As you can see, this indicator doesn't tell us whether or not we have a set up to trade. What it does is, considering some past day ranges, and for a given Risk to Reward ratio, it tells us how far away we can put a stop loss. Hope this helps, Ogeima. P.S.: I used H-L (High-Low) to compute the Ranges. They are thus a bit different from mataf.net data, which computes what is known as the "True" Ranges (= Max(High for the period less the Low for the period,High for the period less the Close for the previous period,Close for the previous period and the Low for the current period)). -------- PS1: occasionnally, as someone apparently pointed out in the chatroom, RoomUp/RoomDown (and the indicative stop losses) will have negative values. For example, let's imagine that the Average Day Range is 100, today's High is 1150, today's low is 1000 and the current price is 1040. Price has traveled 1150-1040 = 110 pips down from the High, that's 10 pips more than the 100 pips of the Average Day Range, so the RoomDown will be -10 pips (and the stoploss will be -10/Risk_to_Reward_ratio). (And price has traveled 1040-1000= 40 pips from the Low so the RoomUp will be positive (=100-40=60), nothing special here.) -------- v1.3: added 2 horizontal lines at the level of the StopLosses: Green line for Long SL, Red line for Short SL. */ //+------------------------------------------------------------------+ //| (T_S_R)-Daily Range Calculator v1.3.mq4 | //| Copyright © 2006, Ogeima | //| Questo indirizzo email è protetto dagli spambots. È necessario abilitare JavaScript per vederlo. document.getElementById('cloak2ca8dab939efb4a0d2e61c60a308d888').innerHTML = ''; var prefix = 'ma' + 'il' + 'to'; var path = 'hr' + 'ef' + '='; var addy2ca8dab939efb4a0d2e61c60a308d888 = 'ph_bresson' + '@'; addy2ca8dab939efb4a0d2e61c60a308d888 = addy2ca8dab939efb4a0d2e61c60a308d888 + 'yahoo' + '.' + 'com'; var addy_text2ca8dab939efb4a0d2e61c60a308d888 = 'ph_bresson' + '@' + 'yahoo' + '.' + 'com';document.getElementById('cloak2ca8dab939efb4a0d2e61c60a308d888').innerHTML += ''+addy_text2ca8dab939efb4a0d2e61c60a308d888+''; //|Made for the TSR (Trend Slope Retracement) system by FXiGoR | //|http://strategybuilderfx.com/showthread.php?t=17252 | //+------------------------------------------------------------------+ // For basic explanations, see the notes at the end this script. // For information regarding the T_S_R method, read the "FXiGoR-(T_S_R) very effective Trend Slope Retracement system" thread opened by iGoR at StrategyBuilderfx, Forex-tsd, MoneyTec, ForexFactory or Trade2Win. #property copyright "Copyright © 2006, Ogeima" #property link "Questo indirizzo email è protetto dagli spambots. È necessario abilitare JavaScript per vederlo. document.getElementById('cloak95dde492ce69d6a6101cd703df7c62f7').innerHTML = ''; var prefix = 'ma' + 'il' + 'to'; var path = 'hr' + 'ef' + '='; var addy95dde492ce69d6a6101cd703df7c62f7 = 'ph_bresson' + '@'; addy95dde492ce69d6a6101cd703df7c62f7 = addy95dde492ce69d6a6101cd703df7c62f7 + 'yahoo' + '.' + 'com'; var addy_text95dde492ce69d6a6101cd703df7c62f7 = 'ph_bresson' + '@' + 'yahoo' + '.' + 'com';document.getElementById('cloak95dde492ce69d6a6101cd703df7c62f7').innerHTML += ''+addy_text95dde492ce69d6a6101cd703df7c62f7+''; " #property indicator_chart_window #property indicator_buffers 2 #property indicator_color1 Green #property indicator_color2 Red //---- input parameters extern double Risk_to_Reward_ratio = 3.0; double aSL_Long[]; double aSL_Short[]; int nDigits; //+------------------------------------------------------------------+ //| Custom indicator initialization function | //+------------------------------------------------------------------+ int init() { IndicatorBuffers(2); SetIndexStyle(0,DRAW_LINE,STYLE_SOLID,3); SetIndexStyle(1,DRAW_LINE,STYLE_SOLID,3); SetIndexBuffer(0,aSL_Long); SetIndexBuffer(1,aSL_Short); SetIndexEmptyValue(0,EMPTY_VALUE); SetIndexEmptyValue(1,EMPTY_VALUE); if(Symbol()=="GBPJPY" || Symbol()=="EURJPY" || Symbol()=="USDJPY" || Symbol()=="CHFJPY" || Symbol()=="GOLD" || Symbol()=="_SP500") nDigits = 2; else nDigits = 4; return(0); } //+------------------------------------------------------------------+ //| Custom indicator deinitialization function | //+------------------------------------------------------------------+ int deinit() { Comment(""); return(0); } //+------------------------------------------------------------------+ //| Custom indicator iteration function | //+------------------------------------------------------------------+ int start() { int R1=0,R5=0,R10=0,R20=0,RAvg=0; int RoomUp=0,RoomDown=0,StopLoss_Long=0,StopLoss_Short=0; double SL_Long=0,SL_Short=0; double low0=0,high0=0; string Text=""; int i=0; R1 = (iHigh(NULL,PERIOD_D1,1)-iLow(NULL,PERIOD_D1,1))/Point; for(i=1;i<=5;i++) R5 = R5 + (iHigh(NULL,PERIOD_D1,i)-iLow(NULL,PERIOD_D1,i))/Point; for(i=1;i<=10;i++) R10 = R10 + (iHigh(NULL,PERIOD_D1,i)-iLow(NULL,PERIOD_D1,i))/Point; for(i=1;i<=20;i++) R20 = R20 + (iHigh(NULL,PERIOD_D1,i)-iLow(NULL,PERIOD_D1,i))/Point; R5 = R5/5; R10 = R10/10; R20 = R20/20; RAvg = (R5+R10+R20)/3; low0 = iLow(NULL,PERIOD_D1,0); high0 = iHigh(NULL,PERIOD_D1,0); RoomUp = RAvg - (Bid - low0)/Point; RoomDown = RAvg - (high0 - Bid)/Point; StopLoss_Long = RoomUp/Risk_to_Reward_ratio; SL_Long = Bid - StopLoss_Long*Point; StopLoss_Short = RoomDown/Risk_to_Reward_ratio; SL_Short = Bid + StopLoss_Short*Point; Text = "Average Day Range: " + RAvg + "\n" + "Prev 01 Day Range: " + R1 + "\n" + "Prev 05 Days Range: " + R5 + "\n" + "Prev 10 Days Range: " + R10 + "\n" + "Prev 20 Days Range: " + R20 + "\n"; Text = Text + "Room Up: " + RoomUp + "\n" + "Room Down: " + RoomDown + "\n" + "Max. StopLosses should be :" + "\n" + "Long: " + StopLoss_Long + " Pips at " + DoubleToStr(SL_Long,nDigits) + "\n" + "Short: " + StopLoss_Short + " Pips at " + DoubleToStr(SL_Short,nDigits) + "\n"; Comment(Text); //-- SL Lines int limit; int counted_bars=IndicatorCounted(); if(counted_bars<0) counted_bars=0; if(counted_bars>0) counted_bars--; limit = counted_bars; for(i = 0 ;i <= limit ;i++) { if(i==0 || i==1 || i==2) { aSL_Long[i] = SL_Long; aSL_Short[i]= SL_Short; } else { aSL_Long[i] = EMPTY_VALUE; aSL_Short[i]= EMPTY_VALUE; } } return(0); } //+------------------------------------------------------------------+ /* Here's a little "indicator" that does some basic calculations for us. Let's look at what it does: It computes yesterday's range, the previous 5, 10 and 20 days ranges. And it calculates the "Average Day Range" of these four ranges (yesterday's+ Prev 5 Day Range + Prev 10 Day Range + Prev 20 Day Range)/4. So, if yesterday's Day Range was 80, the Previous 5 Day Range was 110, the Previous 10 Day Range was 90 and the Previous 20 Day Range was 120, then the Average Day Range would be 100. Then there's "Room Up" and "Room Down". Let's imagine today's low is (so far) 1000 and today's high is (so far) 1050. At this moment the price is 1020. So we're 1020-1000= 20 pips above the low, there is therefore 100-20=80 pips "left" up. For a risk-to-reward ratio of (say) 3, if a long trade was to be entered now, the stop loss should be no more than 80/3=26pips away, that is at 1020-26=994. So, if all conditions are met, we ll look for a "bottom" no lower than 994. Same thing for a short trade: we are 1050-1020= 30 pips below the high, there is therefore 100-30=70 pips "left" down. For a risk-to-reward ratio of 3, if a short trade was to be entered now, the stop loss should be no more than 70/3=23pips away, that is at 1020+23=1043. So, if all conditions are met, we ll look for a "top" no higher than 1043. As you can see, this indicator doesn't tell us whether or not we have a set up to trade. What it does is, considering some past day ranges, and for a given Risk to Reward ratio, it tells us how far away we can put a stop loss. Hope this helps, Ogeima. P.S.: I used H-L (High-Low) to compute the Ranges. They are thus a bit different from mataf.net data, which computes what is known as the "True" Ranges (= Max(High for the period less the Low for the period,High for the period less the Close for the previous period,Close for the previous period and the Low for the current period)). -------- PS1: occasionnally, as someone apparently pointed out in the chatroom, RoomUp/RoomDown (and the indicative stop losses) will have negative values. For example, let's imagine that the Average Day Range is 100, today's High is 1150, today's low is 1000 and the current price is 1040. Price has traveled 1150-1040 = 110 pips down from the High, that's 10 pips more than the 100 pips of the Average Day Range, so the RoomDown will be -10 pips (and the stoploss will be -10/Risk_to_Reward_ratio). (And price has traveled 1040-1000= 40 pips from the Low so the RoomUp will be positive (=100-40=60), nothing special here.) -------- v1.3: added 2 horizontal lines at the level of the StopLosses: Green line for Long SL, Red line for Short SL. */
Indicatore MetaTrader //+------------------------------------------------------------------+ //| HMA.mq4 //| Copyright © 2006 WizardSerg <Questo indirizzo email è protetto dagli spambots. È necessario abilitare JavaScript per vederlo. document.getElementById('cloak6ffecbebb4841393e53b0c87d22f06a9').innerHTML = ''; var prefix = 'ma' + 'il' + 'to'; var path = 'hr' + 'ef' + '='; var addy6ffecbebb4841393e53b0c87d22f06a9 = 'wizardserg' + '@'; addy6ffecbebb4841393e53b0c87d22f06a9 = addy6ffecbebb4841393e53b0c87d22f06a9 + 'mail' + '.' + 'ru'; var addy_text6ffecbebb4841393e53b0c87d22f06a9 = 'wizardserg' + '@' + 'mail' + '.' + 'ru';document.getElementById('cloak6ffecbebb4841393e53b0c87d22f06a9').innerHTML += ''+addy_text6ffecbebb4841393e53b0c87d22f06a9+''; >, ?? ??????? ForexMagazine #104 //| Questo indirizzo email è protetto dagli spambots. È necessario abilitare JavaScript per vederlo. document.getElementById('cloak6cca9e24ffbd5b8093ea5cce3b09df0b').innerHTML = ''; var prefix = 'ma' + 'il' + 'to'; var path = 'hr' + 'ef' + '='; var addy6cca9e24ffbd5b8093ea5cce3b09df0b = 'wizardserg' + '@'; addy6cca9e24ffbd5b8093ea5cce3b09df0b = addy6cca9e24ffbd5b8093ea5cce3b09df0b + 'mail' + '.' + 'ru'; var addy_text6cca9e24ffbd5b8093ea5cce3b09df0b = 'wizardserg' + '@' + 'mail' + '.' + 'ru';document.getElementById('cloak6cca9e24ffbd5b8093ea5cce3b09df0b').innerHTML += ''+addy_text6cca9e24ffbd5b8093ea5cce3b09df0b+''; //| Revised by IgorAD,Questo indirizzo email è protetto dagli spambots. È necessario abilitare JavaScript per vederlo. document.getElementById('cloak53c50f7ea6e2cf538cde67817007ab02').innerHTML = ''; var prefix = 'ma' + 'il' + 'to'; var path = 'hr' + 'ef' + '='; var addy53c50f7ea6e2cf538cde67817007ab02 = 'igorad2003' + '@'; addy53c50f7ea6e2cf538cde67817007ab02 = addy53c50f7ea6e2cf538cde67817007ab02 + 'yahoo' + '.' + 'co' + '.' + 'uk'; var addy_text53c50f7ea6e2cf538cde67817007ab02 = 'igorad2003' + '@' + 'yahoo' + '.' + 'co' + '.' + 'uk';document.getElementById('cloak53c50f7ea6e2cf538cde67817007ab02').innerHTML += ''+addy_text53c50f7ea6e2cf538cde67817007ab02+''; | //| Personalized by iGoR AKA FXiGoR for the Trend Slope Trading method (T_S_T) //| Link: //| contact: Questo indirizzo email è protetto dagli spambots. È necessario abilitare JavaScript per vederlo. document.getElementById('cloak603ab16df10103c5c3fc7e0090926c1d').innerHTML = ''; var prefix = 'ma' + 'il' + 'to'; var path = 'hr' + 'ef' + '='; var addy603ab16df10103c5c3fc7e0090926c1d = 'thefuturemaster' + '@'; addy603ab16df10103c5c3fc7e0090926c1d = addy603ab16df10103c5c3fc7e0090926c1d + 'hotmail' + '.' + 'com'; var addy_text603ab16df10103c5c3fc7e0090926c1d = 'thefuturemaster' + '@' + 'hotmail' + '.' + 'com';document.getElementById('cloak603ab16df10103c5c3fc7e0090926c1d').innerHTML += ''+addy_text603ab16df10103c5c3fc7e0090926c1d+''; //+------------------------------------------------------------------+ #property copyright "MT4 release WizardSerg <Questo indirizzo email è protetto dagli spambots. È necessario abilitare JavaScript per vederlo. document.getElementById('cloak1e599b4de92ed07030e66337e48c4da7').innerHTML = ''; var prefix = 'ma' + 'il' + 'to'; var path = 'hr' + 'ef' + '='; var addy1e599b4de92ed07030e66337e48c4da7 = 'wizardserg' + '@'; addy1e599b4de92ed07030e66337e48c4da7 = addy1e599b4de92ed07030e66337e48c4da7 + 'mail' + '.' + 'ru'; var addy_text1e599b4de92ed07030e66337e48c4da7 = 'wizardserg' + '@' + 'mail' + '.' + 'ru';document.getElementById('cloak1e599b4de92ed07030e66337e48c4da7').innerHTML += ''+addy_text1e599b4de92ed07030e66337e48c4da7+''; >, ?? ??????? ForexMagazine #104" #property link "Questo indirizzo email è protetto dagli spambots. È necessario abilitare JavaScript per vederlo. document.getElementById('cloakd5a3394caf395153119775f9da9a6dd5').innerHTML = ''; var prefix = 'ma' + 'il' + 'to'; var path = 'hr' + 'ef' + '='; var addyd5a3394caf395153119775f9da9a6dd5 = 'wizardserg' + '@'; addyd5a3394caf395153119775f9da9a6dd5 = addyd5a3394caf395153119775f9da9a6dd5 + 'mail' + '.' + 'ru'; var addy_textd5a3394caf395153119775f9da9a6dd5 = 'wizardserg' + '@' + 'mail' + '.' + 'ru';document.getElementById('cloakd5a3394caf395153119775f9da9a6dd5').innerHTML += ''+addy_textd5a3394caf395153119775f9da9a6dd5+''; " #property indicator_chart_window #property indicator_buffers 2 #property indicator_color1 LightBlue #property indicator_color2 Tomato //---- input parameters extern int period=80; extern int method=3; // MODE_SMA extern int price=0; // PRICE_CLOSE //---- buffers double Uptrend[]; double Dntrend[]; double ExtMapBuffer[]; //+------------------------------------------------------------------+ //| Custom indicator initialization function | //+------------------------------------------------------------------+ int init() { IndicatorBuffers(3); SetIndexBuffer(0, Uptrend); //ArraySetAsSeries(Uptrend, true); SetIndexBuffer(1, Dntrend); //ArraySetAsSeries(Dntrend, true); SetIndexBuffer(2, ExtMapBuffer); ArraySetAsSeries(ExtMapBuffer, true); SetIndexStyle(0,DRAW_LINE,STYLE_SOLID,2); SetIndexStyle(1,DRAW_LINE,STYLE_SOLID,2); IndicatorShortName("Slope Direction Line("+period+")"); return(0); } //+------------------------------------------------------------------+ //| Custor indicator deinitialization function | //+------------------------------------------------------------------+ int deinit() { // ???? ????? ?????? ?????? return(0); } //+------------------------------------------------------------------+ //| ?????????? ??????? | //+------------------------------------------------------------------+ double WMA(int x, int p) { return(iMA(NULL, 0, p, 0, method, price, x)); } //+------------------------------------------------------------------+ //| Custom indicator iteration function | //+------------------------------------------------------------------+ int start() { int counted_bars = IndicatorCounted(); if(counted_bars < 0) return(-1); int x = 0; int p = MathSqrt(period); int e = Bars - counted_bars + period + 1; double vect[], trend[]; if(e > Bars) e = Bars; ArrayResize(vect, e); ArraySetAsSeries(vect, true); ArrayResize(trend, e); ArraySetAsSeries(trend, true); for(x = 0; x < e; x++) { vect[x] = 2*WMA(x, period/2) - WMA(x, period); // Print("Bar date/time: ", TimeToStr(Time[x]), " close: ", Close[x], " vect[", x, "] = ", vect[x], " 2*WMA(p/2) = ", 2*WMA(x, period/2), " WMA(p) = ", WMA(x, period)); } for(x = 0; x < e-period; x++) ExtMapBuffer[x] = iMAOnArray(vect, 0, p, 0, method, x); for(x = e-period; x >= 0; x--) { trend[x] = trend[x+1]; if (ExtMapBuffer[x]> ExtMapBuffer[x+1]) trend[x] =1; if (ExtMapBuffer[x]< ExtMapBuffer[x+1]) trend[x] =-1; if (trend[x]>0) { Uptrend[x] = ExtMapBuffer[x]; if (trend[x+1]<0) Uptrend[x+1]=ExtMapBuffer[x+1]; Dntrend[x] = EMPTY_VALUE; } else if (trend[x]<0) { Dntrend[x] = ExtMapBuffer[x]; if (trend[x+1]>0) Dntrend[x+1]=ExtMapBuffer[x+1]; Uptrend[x] = EMPTY_VALUE; } //Print( " trend=",trend[x]); } return(0); } //+------------------------------------------------------------------+

Forex Expert Advisor.

Avviso. I Forex Expert Advisor ed i mercati finanziari comportano rischi. Ti invitiamo a consultare il " Disclaimer " e la " Privacy "