Indicators

Notification Publishing copyrighted material is strictly prohibited. If you believe there is copyrighted material in this section you may use the Copyright Infringement Notification form to submit a claim.
How to install
Zero Lag Tema
  0
  5
  3135
free  09 Jan 2014
This is Zero Lag Tema.   2 * tema(i) - tema(tema(i)) TEMA: Triple Exponential Moving Average  References Tema.algo (/algos/indicators/show/170)    
free  16 May 2012
Zero Lag MA is an indicator that attempts to remove the lagging characteristics of indicators like the Exponential Moving Average. It does this by tracking current prices more closely than previous prices.  
zig zag buy sell
  0
  0
  3102
free  09 Mar 2015
//+------------------------------------------------------------------+ //|                                             ZigAndZagScalpel.mq4 | //|                           Bookkeeper, 2006, yuzefovich@gmail.com | //+------------------------------------------------------------------+ #property copyright "" #property link      "" //---- #property indicator_chart_window #property indicator_buffers 7     // Èëè 8 - äëÿ testBuffer #property indicator_color1 Aqua #property indicator_color2 Black #property indicator_color3 Black #property indicator_color4 Black #property indicator_color5 White #property indicator_color6 Red #property indicator_color7 Red //#property indicator_color8 White // Äëÿ ïîäáîðà ÷åãî-íèáóäü extern int KeelOver=55; // Äëÿ M15 extern int Slalom=17;  // Äëÿ M15 double KeelOverZigAndZagSECTION[]; double KeelOverZagBuffer[]; double SlalomZigBuffer[]; double SlalomZagBuffer[]; double LimitOrdersBuffer[]; double BuyOrdersBuffer[]; double SellOrdersBuffer[]; //double testBuffer[]; int    shift,back,CountBar,Backstep=3; int    LastSlalomZagPos,LastSlalomZigPos,LastKeelOverZagPos,LastKeelOverZigPos; double Something,LimitPoints,Navel; double CurKeelOverZig,CurKeelOverZag,CurSlalomZig,CurSlalomZag; double LastSlalomZag,LastSlalomZig,LastKeelOverZag,LastKeelOverZig; bool   TrendUp,SetBuyOrder,SetLimitOrder,SetSellOrder,Second=false; string LastZigOrZag="None"; //---- int init()   {    SetIndexBuffer(0,KeelOverZigAndZagSECTION);    SetIndexStyle(0,DRAW_SECTION,STYLE_DOT);//DRAW_SECTION èëè DRAW_NONE    SetIndexEmptyValue(0,0.0);    SetIndexBuffer(1,KeelOverZagBuffer);    SetIndexStyle(1,DRAW_NONE);    SetIndexEmptyValue(1,0.0);    SetIndexBuffer(2,SlalomZigBuffer);    SetIndexStyle(2,DRAW_NONE);    SetIndexEmptyValue(2,0.0);    SetIndexBuffer(3,SlalomZagBuffer);    SetIndexStyle(3,DRAW_NONE);    SetIndexEmptyValue(3,0.0);    SetIndexBuffer(4,LimitOrdersBuffer);    SetIndexStyle(4,DRAW_ARROW);    SetIndexArrow(4,108);    SetIndexEmptyValue(4,0.0);    SetIndexBuffer(5,BuyOrdersBuffer);    SetIndexStyle(5,DRAW_ARROW);    SetIndexArrow(5,233);    SetIndexEmptyValue(5,0.0);    SetIndexBuffer(6,SellOrdersBuffer);    SetIndexStyle(6,DRAW_ARROW);    SetIndexArrow(6,234);    SetIndexEmptyValue(6,0.0);    //   SetIndexStyle(7,DRAW_SECTION);    //   SetIndexBuffer(7,testBuffer);    //   SetIndexEmptyValue(7,0.0);    return(0);   } //+------------------------------------------------------------------+ //|                                                                  | //+------------------------------------------------------------------+ int start()   {    CountBar=Bars-KeelOver;    LimitPoints=Ask-Bid;    if(CountBar<=3*KeelOver) return(-1); // Ìàëîâàòî áóäåò    if(KeelOver<=2*Slalom) return(-1);  // Òùàòåëüíåå íàäî    // Çà÷èñòêà íåïðàâèëüíîé èñòîðèè    for(shift=Bars-1; shift>Bars-KeelOver; shift--)      {       SlalomZagBuffer[shift]=0.0;       SlalomZigBuffer[shift]=0.0;       KeelOverZagBuffer[shift]=0.0;       KeelOverZigAndZagSECTION[shift]=0.0;       LimitOrdersBuffer[shift]=0.0;       BuyOrdersBuffer[shift]=0.0;       SellOrdersBuffer[shift]=0.0;       //      testBuffer[shift]=0.0;      }    //+---Ïåðâûé ïîõîä ïî èñòîðèè----------------------------------------+    The_First_Crusade();    //+---Âòîðîé ïðîõîä ïî èñòîðè÷åñêèì ìåñòàì---------------------------+    //+---ñ öåëüþ ïîä÷èñòêè íåâåðíî ïîíÿòûõ ñîáûòèé----------------------+    LastSlalomZag=-1; LastSlalomZagPos=-1;    LastSlalomZig=-1;  LastSlalomZigPos=-1;    LastKeelOverZag=-1; LastKeelOverZagPos=-1;    LastKeelOverZig=-1;  LastKeelOverZigPos=-1;    The_Second_Crusade();    //+---Òðåòèé èñòîðè÷åñêèé ýêñêóðñ - ïîñòðîåíèå "òðåíäà"--------------+    //+---è ðàññòàíîâêà "òîðãîâûõ ñèãíàëîâ"------------------------------+    LastSlalomZag=-1; LastSlalomZagPos=-1;    LastSlalomZig=-1;  LastSlalomZigPos=-1;    LastZigOrZag="None";    The_Third_Crusade();    //+---À ÷åãî ìû òåïåðü áóäåì èìåòü çäåñü è ñåé÷àñ?-------------------+    Shift_Zerro();    return(0);   } //+------------------------------------------------------------------+ //|                                                                  | //+------------------------------------------------------------------+ void The_First_Crusade()   {    for(shift=CountBar; shift>0; shift--)      {       // Ïîèñê òî÷åê "âñòàë â ïîçó" - "óøåë ñ ðûíêà"       CurSlalomZig=Low[Lowest(NULL,0,MODE_LOW,Slalom,shift)];       CurSlalomZag=High[Highest(NULL,0,MODE_HIGH,Slalom,shift)];       // Ïðîâåðÿåì shift íà íàëè÷èå î÷åðåäíîãî ÑëàëîìÇèãà äëÿ âõîäà       // â ïîêóïêó èëè äëÿ âûõîäà èç ïðîäàæè       if(CurSlalomZig==LastSlalomZig) CurSlalomZig=0.0;       else         {          LastSlalomZig=CurSlalomZig;          if((Low[shift]-CurSlalomZig)>LimitPoints) CurSlalomZig=0.0;          else            {             // Íà èíòåðâàëå Backstep ìîæåò áûòü òîëüêî îäèí Çèã,             // îñòàâëÿåì òîëüêî ïîñëåäíèé, áîëåå ðàííèå óáèðàåì             for(back=1; back<=Backstep; back++)               {                Something=SlalomZigBuffer[shift+back];                if((Something!=0)&&(Something>CurSlalomZig))                   SlalomZigBuffer[shift+back]=0.0;               }            }         }       // Ïðîâåðÿåì shift íà íàëè÷èå î÷åðåäíîãî ÑëàëîìÇàãà äëÿ âõîäà âíèç       // èëè äëÿ âûõîäà èç ïîêóïêè       if(CurSlalomZag==LastSlalomZag) CurSlalomZag=0.0;       else         {          LastSlalomZag=CurSlalomZag;          if((CurSlalomZag-High[shift])>LimitPoints) CurSlalomZag=0.0;          else            {             // Íà èíòåðâàëå Backstep ìîæåò áûòü òîëüêî îäèí Çàã,             // îñòàâëÿåì òîëüêî ïîñëåäíèé, áîëåå ðàííèå óáèðàåì             for(back=1; back<=Backstep; back++)               {                Something=SlalomZagBuffer[shift+back];                if((Something!=0)&&(Something                   SlalomZagBuffer[shift+back]=0.0;               }            }         }       // Âñå, ÷òî íàøëè íîâåíüêîãî è ïóñòûøêè - êëàäåì â áóôåðà ñëàëîìà       SlalomZigBuffer[shift]=CurSlalomZig;       SlalomZagBuffer[shift]=CurSlalomZag;       // Èùåì òî÷êè ðàçâîðîòà äëÿ ïîñòðîåíèÿ "ëèíåéíîãî òðåíäà", ïðè ýòîì       // â áóôåð ðàçâîðîòîâ ZigAndZag ïîêà ÷òî áóäåì êëàñòü òîëüêî ÎâåðêèëüÇèãè       CurKeelOverZig=Low[Lowest(NULL,0,MODE_LOW,KeelOver,shift)];       CurKeelOverZag=High[Highest(NULL,0,MODE_HIGH,KeelOver,shift)];       // Ïðîâåðÿåì shift íà íàëè÷èå î÷åðåäíîãî ÎâåðêèëüÇèãà       if(CurKeelOverZig==LastKeelOverZig) CurKeelOverZig=0.0;       else         {          LastKeelOverZig=CurKeelOverZig;          if((Low[shift]-CurKeelOverZig)>LimitPoints) CurKeelOverZig=0.0;          else            {             // Íà èíòåðâàëå Backstep ìîæåò áûòü òîëüêî îäèí Çèã,             // îñòàâëÿåì òîëüêî ïîñëåäíèé, áîëåå ðàííèå óáèðàåì             for(back=1; back<=Backstep; back++)               {                Something=KeelOverZigAndZagSECTION[shift+back];                if((Something!=0)&&(Something>CurKeelOverZig))                   KeelOverZigAndZagSECTION[shift+back]=0.0;               }            }         }       // Ïðîâåðÿåì shift íà íàëè÷èå î÷åðåäíîãî ÎâåðêèëüÇàãà       if(CurKeelOverZag==LastKeelOverZag) CurKeelOverZag=0.0;       else         {          LastKeelOverZag=CurKeelOverZag;          if((CurKeelOverZag-High[shift])>LimitPoints) CurKeelOverZag=0.0;          else            {             // Íà èíòåðâàëå Backstep ìîæåò áûòü òîëüêî îäèí Çàã,             // áîëåå ðàííèå óáèðàåì             for(back=1; back<=Backstep; back++)               {                Something=KeelOverZagBuffer[shift+back];                if((Something!=0)&&(Something                   KeelOverZagBuffer[shift+back]=0.0;               }            }         }       // Âñå, ÷òî íàøëè èëè íå íàøëè - êëàäåì â áóôåðà ðàçâîðîòîâ       KeelOverZigAndZagSECTION[shift]=CurKeelOverZig;       KeelOverZagBuffer[shift]=CurKeelOverZag;      }    return;   } //+------------------------------------------------------------------+ //|                                                                  | //+------------------------------------------------------------------+ void The_Second_Crusade()   {    // Ïðîñòî ïîä÷èñòêà ëèøíåãî    for(shift=CountBar; shift>0; shift--)      {       CurSlalomZig=SlalomZigBuffer[shift];       CurSlalomZag=SlalomZagBuffer[shift];       if((CurSlalomZig==0)&&(CurSlalomZag==0)) continue;       if(CurSlalomZag!=0)         {          if(LastSlalomZag>0)            {             if(LastSlalomZag             else SlalomZagBuffer[shift]=0;            }          if(LastSlalomZag            {             LastSlalomZag=CurSlalomZag;             LastSlalomZagPos=shift;            }          LastSlalomZig=-1;         }       if(CurSlalomZig!=0)         {          if(LastSlalomZig>0)            {             if(LastSlalomZig>CurSlalomZig) SlalomZigBuffer[LastSlalomZigPos]=0;             else SlalomZigBuffer[shift]=0;            }          if((CurSlalomZig            {             LastSlalomZig=CurSlalomZig;             LastSlalomZigPos=shift;            }          LastSlalomZag=-1;         }       CurKeelOverZig=KeelOverZigAndZagSECTION[shift];       CurKeelOverZag=KeelOverZagBuffer[shift];       if((CurKeelOverZig==0)&&(CurKeelOverZag==0)) continue;       if(CurKeelOverZag !=0)         {          if(LastKeelOverZag>0)            {             if(LastKeelOverZag                KeelOverZagBuffer[LastKeelOverZagPos]=0;             else KeelOverZagBuffer[shift]=0.0;            }          if(LastKeelOverZag            {             LastKeelOverZag=CurKeelOverZag;             LastKeelOverZagPos=shift;            }          LastKeelOverZig=-1;         }       if(CurKeelOverZig!=0)         {          if(LastKeelOverZig>0)            {             if(LastKeelOverZig>CurSlalomZig)                KeelOverZigAndZagSECTION[LastKeelOverZigPos]=0;             else KeelOverZigAndZagSECTION[shift]=0;            }          if((CurKeelOverZig            {             LastKeelOverZig=CurKeelOverZig;             LastKeelOverZigPos=shift;            }          LastKeelOverZag=-1;         }      }    return;   } //+------------------------------------------------------------------+ //|                                                                  | //+------------------------------------------------------------------+ void The_Third_Crusade()   {    bool first=true;    for(shift=CountBar; shift>0; shift--)      {       // Íèçâåãàåì ïðåæíèõ ïðîðîêîâ       LimitOrdersBuffer[shift]=0.0;       BuyOrdersBuffer[shift]=0.0;       SellOrdersBuffer[shift]=0.0;       // Çàäàåì öåíòð ìèðîçäàíüÿ èíòåðâàëà shift (ïî ëþáîìó -       // ñïîñîá áîëüøîãî ïîëèòè÷åñêîãî âåñà íå èìååò)       Navel=(5*Close[shift]+2*Open[shift]+High[shift]+Low[shift])/9;       // Åñëè îâåðêèëü - ñìîòðèì,       // êóäà (ìîæåò áûòü) äàëüøå ñåéìîìåíòíî ïîéäåì: ââåðõ èëè âíèç       if(KeelOverZigAndZagSECTION[shift]!=0.0)         {          TrendUp=true;          first=false;         }       if(KeelOverZagBuffer[shift]!=0.0)         {          TrendUp=false;          first=false;         }       // Ñîáèðàåì â KeelOverZigAndZagSECTION è ÎâåðêèëüÇèãè, è ÎâåðêèëüÇàãè,       // è ïóñòûøêè - âñå â îäíó êó÷êó, òàêèì îáðàçîì ïîëó÷àåì äîëãîèãðàþùèé       // ZigAndZag, íàòÿãèâàÿ íèòü "òðåíäà" íà ïóïêè ðàçâîðîòíûõ ñâå÷åê       if(KeelOverZagBuffer[shift]!=0.0 || KeelOverZigAndZagSECTION[shift]!=0.0)         {          KeelOverZigAndZagSECTION[shift]=Navel;         }       else KeelOverZigAndZagSECTION[shift]=0.0;       // Ïðîâåðÿåì shift íà íàëè÷èå ÑëàëîìÇèãà èëè ÑëàëîìÇàãà       if(SlalomZigBuffer[shift]!=0.0)         {          LastZigOrZag="Zig";          LastSlalomZig=Navel;          SetBuyOrder=false;          SetLimitOrder=false;          SetSellOrder=false;         }       if(SlalomZagBuffer[shift]!=0.0)         {          LastZigOrZag="Zag";          LastSlalomZag=Navel;          SetBuyOrder=false;          SetLimitOrder=false;          SetSellOrder=false;         }       // è, åñëè íè ÑëàëîìÇèãà, íè ÑëàëîìÇàãà óæå íåò,       // à îâåðêèëü óæå áûë - ñìîòðèì, à ÷òî åñòü ïî âõîäó-âûõîäó       if(SlalomZigBuffer[shift]==0.0 &&          SlalomZagBuffer[shift]==0.0 &&          first==false)                  Slalom_With_A_Scalpel();      }    return;   } //+------------------------------------------------------------------+ //|                                                                  | //+------------------------------------------------------------------+ void Shift_Zerro()   {    shift=0;    Navel=(5*Close[0]+2*Open[0]+High[0]+Low[0])/9;    Slalom_With_A_Scalpel();    KeelOverZigAndZagSECTION[0]=Navel;    return;   } //+------------------------------------------------------------------+ //|                                                                  | //+------------------------------------------------------------------+ void Slalom_With_A_Scalpel()   {    // Ïðîâåðÿåì ñóùåñòâóþùèé ñèãíàë íà èìååò ïðàâî áûòü    // èëè íà åñëè íå ñòîèò, à õîòåëîñü áû:      // åñëè õîä ÷èñòî êîíêðåòíî ïî æèçíè - çàáèâàåì Ñòðåëêó íà äåíüãè,    // åñëè ïðîòèâ - ñòàâèì íà øóõåð Øàðèêà Äåëàé-Íîãè    if(LastZigOrZag=="Zig")      {       if(TrendUp==true)         {          if((Navel-LastSlalomZig)>=LimitPoints && SetBuyOrder==false)            {             SetBuyOrder=true;             BuyOrdersBuffer[shift]=Low[shift+1];             LastSlalomZigPos=shift;            }          if(Navel<=LastSlalomZig && SetBuyOrder==true)            {             SetBuyOrder=false;             BuyOrdersBuffer[LastSlalomZigPos]=0.0;             LastSlalomZigPos=-1;            }         }       if(TrendUp==false)         {          if(Navel>LastSlalomZig && SetLimitOrder==false)            {             SetLimitOrder=true;             LimitOrdersBuffer[shift]=Navel;             //            LimitOrdersBuffer[shift]=Close[shift];             LastSlalomZigPos=shift;            }          if(Navel<=LastSlalomZig && SetLimitOrder==true)            {             SetLimitOrder=false;             LimitOrdersBuffer[LastSlalomZigPos]=0.0;             LastSlalomZigPos=-1;            }         }      }    if(LastZigOrZag=="Zag")      {       if(TrendUp==false)         {          if((LastSlalomZag-Navel)>=LimitPoints && SetSellOrder==false)            {             SetSellOrder=true;             SellOrdersBuffer[shift]=High[shift+1];             LastSlalomZagPos=shift;            }          if(Navel>=LastSlalomZag && SetSellOrder==true)            {             SetSellOrder=false;             SellOrdersBuffer[LastSlalomZagPos]=0.0;             LastSlalomZagPos=-1;            }         }       if(TrendUp==true)         {          if(LastSlalomZag>Navel && SetLimitOrder==false)            {             SetLimitOrder=true;             LimitOrdersBuffer[shift]=Navel;             //            LimitOrdersBuffer[shift]=Close[shift];             LastSlalomZagPos=shift;            }          if(Navel>=LastSlalomZag && SetLimitOrder==true)            {             SetLimitOrder=false;             LimitOrdersBuffer[LastSlalomZagPos]=0.0;             LastSlalomZagPos=-1;            }         }      }    return;   } //+--Ñîáñòâåííî, ÿ âñå ñêàçàë. Çàáàâíî, åñëè âñå ýòî ðàáîòàòü áóäåò--+ //+------------------------------------------------------------------+  
zig zag buy sell
  1
  0
  5542
free  09 Mar 2015
//+------------------------------------------------------------------+ //| ZigAndZagScalpel.mq4 | //| Bookkeeper, 2006, yuzefovich@gmail.com | //+------------------------------------------------------------------+ #property copyright "" #property link "" //---- #property indicator_chart_window #property indicator_buffers 7 // Èëè 8 - äëÿ testBuffer #property indicator_color1 Aqua #property indicator_color2 Black #property indicator_color3 Black #property indicator_color4 Black #property indicator_color5 White #property indicator_color6 Red #property indicator_color7 Red //#property indicator_color8 White // Äëÿ ïîäáîðà ÷åãî-íèáóäü extern int KeelOver=55; // Äëÿ M15 extern int Slalom=17; // Äëÿ M15 double KeelOverZigAndZagSECTION[]; double KeelOverZagBuffer[]; double SlalomZigBuffer[]; double SlalomZagBuffer[]; double LimitOrdersBuffer[]; double BuyOrdersBuffer[]; double SellOrdersBuffer[]; //double testBuffer[]; int shift,back,CountBar,Backstep=3; int LastSlalomZagPos,LastSlalomZigPos,LastKeelOverZagPos,LastKeelOverZigPos; double Something,LimitPoints,Navel; double CurKeelOverZig,CurKeelOverZag,CurSlalomZig,CurSlalomZag; double LastSlalomZag,LastSlalomZig,LastKeelOverZag,LastKeelOverZig; bool TrendUp,SetBuyOrder,SetLimitOrder,SetSellOrder,Second=false; string LastZigOrZag="None"; //---- int init() { SetIndexBuffer(0,KeelOverZigAndZagSECTION); SetIndexStyle(0,DRAW_SECTION,STYLE_DOT);//DRAW_SECTION èëè DRAW_NONE SetIndexEmptyValue(0,0.0); SetIndexBuffer(1,KeelOverZagBuffer); SetIndexStyle(1,DRAW_NONE); SetIndexEmptyValue(1,0.0); SetIndexBuffer(2,SlalomZigBuffer); SetIndexStyle(2,DRAW_NONE); SetIndexEmptyValue(2,0.0); SetIndexBuffer(3,SlalomZagBuffer); SetIndexStyle(3,DRAW_NONE); SetIndexEmptyValue(3,0.0); SetIndexBuffer(4,LimitOrdersBuffer); SetIndexStyle(4,DRAW_ARROW); SetIndexArrow(4,108); SetIndexEmptyValue(4,0.0); SetIndexBuffer(5,BuyOrdersBuffer); SetIndexStyle(5,DRAW_ARROW); SetIndexArrow(5,233); SetIndexEmptyValue(5,0.0); SetIndexBuffer(6,SellOrdersBuffer); SetIndexStyle(6,DRAW_ARROW); SetIndexArrow(6,234); SetIndexEmptyValue(6,0.0); // SetIndexStyle(7,DRAW_SECTION); // SetIndexBuffer(7,testBuffer); // SetIndexEmptyValue(7,0.0); return(0); } //+------------------------------------------------------------------+ //| | //+------------------------------------------------------------------+ int start() { CountBar=Bars-KeelOver; LimitPoints=Ask-Bid; if(CountBar<=3*KeelOver) return(-1); // Ìàëîâàòî áóäåò if(KeelOver<=2*Slalom) return(-1); // Òùàòåëüíåå íàäî // Çà÷èñòêà íåïðàâèëüíîé èñòîðèè for(shift=Bars-1; shift>Bars-KeelOver; shift--) { SlalomZagBuffer[shift]=0.0; SlalomZigBuffer[shift]=0.0; KeelOverZagBuffer[shift]=0.0; KeelOverZigAndZagSECTION[shift]=0.0; LimitOrdersBuffer[shift]=0.0; BuyOrdersBuffer[shift]=0.0; SellOrdersBuffer[shift]=0.0; // testBuffer[shift]=0.0; } //+---Ïåðâûé ïîõîä ïî èñòîðèè----------------------------------------+ The_First_Crusade(); //+---Âòîðîé ïðîõîä ïî èñòîðè÷åñêèì ìåñòàì---------------------------+ //+---ñ öåëüþ ïîä÷èñòêè íåâåðíî ïîíÿòûõ ñîáûòèé----------------------+ LastSlalomZag=-1; LastSlalomZagPos=-1; LastSlalomZig=-1; LastSlalomZigPos=-1; LastKeelOverZag=-1; LastKeelOverZagPos=-1; LastKeelOverZig=-1; LastKeelOverZigPos=-1; The_Second_Crusade(); //+---Òðåòèé èñòîðè÷åñêèé ýêñêóðñ - ïîñòðîåíèå "òðåíäà"--------------+ //+---è ðàññòàíîâêà "òîðãîâûõ ñèãíàëîâ"------------------------------+ LastSlalomZag=-1; LastSlalomZagPos=-1; LastSlalomZig=-1; LastSlalomZigPos=-1; LastZigOrZag="None"; The_Third_Crusade(); //+---À ÷åãî ìû òåïåðü áóäåì èìåòü çäåñü è ñåé÷àñ?-------------------+ Shift_Zerro(); return(0); } //+------------------------------------------------------------------+ //| | //+------------------------------------------------------------------+ void The_First_Crusade() { for(shift=CountBar; shift>0; shift--) { // Ïîèñê òî÷åê "âñòàë â ïîçó" - "óøåë ñ ðûíêà" CurSlalomZig=Low[Lowest(NULL,0,MODE_LOW,Slalom,shift)]; CurSlalomZag=High[Highest(NULL,0,MODE_HIGH,Slalom,shift)]; // Ïðîâåðÿåì shift íà íàëè÷èå î÷åðåäíîãî ÑëàëîìÇèãà äëÿ âõîäà // â ïîêóïêó èëè äëÿ âûõîäà èç ïðîäàæè if(CurSlalomZig==LastSlalomZig) CurSlalomZig=0.0; else { LastSlalomZig=CurSlalomZig; if((Low[shift]-CurSlalomZig)>LimitPoints) CurSlalomZig=0.0; else { // Íà èíòåðâàëå Backstep ìîæåò áûòü òîëüêî îäèí Çèã, // îñòàâëÿåì òîëüêî ïîñëåäíèé, áîëåå ðàííèå óáèðàåì for(back=1; back<=Backstep; back++) { Something=SlalomZigBuffer[shift+back]; if((Something!=0)&&(Something>CurSlalomZig)) SlalomZigBuffer[shift+back]=0.0; } } } // Ïðîâåðÿåì shift íà íàëè÷èå î÷åðåäíîãî ÑëàëîìÇàãà äëÿ âõîäà âíèç // èëè äëÿ âûõîäà èç ïîêóïêè if(CurSlalomZag==LastSlalomZag) CurSlalomZag=0.0; else { LastSlalomZag=CurSlalomZag; if((CurSlalomZag-High[shift])>LimitPoints) CurSlalomZag=0.0; else { // Íà èíòåðâàëå Backstep ìîæåò áûòü òîëüêî îäèí Çàã, // îñòàâëÿåì òîëüêî ïîñëåäíèé, áîëåå ðàííèå óáèðàåì for(back=1; back<=Backstep; back++) { Something=SlalomZagBuffer[shift+back]; if((Something!=0)&&(SomethingLimitPoints) CurKeelOverZig=0.0; else { // Íà èíòåðâàëå Backstep ìîæåò áûòü òîëüêî îäèí Çèã, // îñòàâëÿåì òîëüêî ïîñëåäíèé, áîëåå ðàííèå óáèðàåì for(back=1; back<=Backstep; back++) { Something=KeelOverZigAndZagSECTION[shift+back]; if((Something!=0)&&(Something>CurKeelOverZig)) KeelOverZigAndZagSECTION[shift+back]=0.0; } } } // Ïðîâåðÿåì shift íà íàëè÷èå î÷åðåäíîãî ÎâåðêèëüÇàãà if(CurKeelOverZag==LastKeelOverZag) CurKeelOverZag=0.0; else { LastKeelOverZag=CurKeelOverZag; if((CurKeelOverZag-High[shift])>LimitPoints) CurKeelOverZag=0.0; else { // Íà èíòåðâàëå Backstep ìîæåò áûòü òîëüêî îäèí Çàã, // áîëåå ðàííèå óáèðàåì for(back=1; back<=Backstep; back++) { Something=KeelOverZagBuffer[shift+back]; if((Something!=0)&&(Something0; shift--) { CurSlalomZig=SlalomZigBuffer[shift]; CurSlalomZag=SlalomZagBuffer[shift]; if((CurSlalomZig==0)&&(CurSlalomZag==0)) continue; if(CurSlalomZag!=0) { if(LastSlalomZag>0) { if(LastSlalomZag0) { if(LastSlalomZig>CurSlalomZig) SlalomZigBuffer[LastSlalomZigPos]=0; else SlalomZigBuffer[shift]=0; } if((CurSlalomZig0) { if(LastKeelOverZag0) { if(LastKeelOverZig>CurSlalomZig) KeelOverZigAndZagSECTION[LastKeelOverZigPos]=0; else KeelOverZigAndZagSECTION[shift]=0; } if((CurKeelOverZig0; shift--) { // Íèçâåãàåì ïðåæíèõ ïðîðîêîâ LimitOrdersBuffer[shift]=0.0; BuyOrdersBuffer[shift]=0.0; SellOrdersBuffer[shift]=0.0; // Çàäàåì öåíòð ìèðîçäàíüÿ èíòåðâàëà shift (ïî ëþáîìó - // ñïîñîá áîëüøîãî ïîëèòè÷åñêîãî âåñà íå èìååò) Navel=(5*Close[shift]+2*Open[shift]+High[shift]+Low[shift])/9; // Åñëè îâåðêèëü - ñìîòðèì, // êóäà (ìîæåò áûòü) äàëüøå ñåéìîìåíòíî ïîéäåì: ââåðõ èëè âíèç if(KeelOverZigAndZagSECTION[shift]!=0.0) { TrendUp=true; first=false; } if(KeelOverZagBuffer[shift]!=0.0) { TrendUp=false; first=false; } // Ñîáèðàåì â KeelOverZigAndZagSECTION è ÎâåðêèëüÇèãè, è ÎâåðêèëüÇàãè, // è ïóñòûøêè - âñå â îäíó êó÷êó, òàêèì îáðàçîì ïîëó÷àåì äîëãîèãðàþùèé // ZigAndZag, íàòÿãèâàÿ íèòü "òðåíäà" íà ïóïêè ðàçâîðîòíûõ ñâå÷åê if(KeelOverZagBuffer[shift]!=0.0 || KeelOverZigAndZagSECTION[shift]!=0.0) { KeelOverZigAndZagSECTION[shift]=Navel; } else KeelOverZigAndZagSECTION[shift]=0.0; // Ïðîâåðÿåì shift íà íàëè÷èå ÑëàëîìÇèãà èëè ÑëàëîìÇàãà if(SlalomZigBuffer[shift]!=0.0) { LastZigOrZag="Zig"; LastSlalomZig=Navel; SetBuyOrder=false; SetLimitOrder=false; SetSellOrder=false; } if(SlalomZagBuffer[shift]!=0.0) { LastZigOrZag="Zag"; LastSlalomZag=Navel; SetBuyOrder=false; SetLimitOrder=false; SetSellOrder=false; } // è, åñëè íè ÑëàëîìÇèãà, íè ÑëàëîìÇàãà óæå íåò, // à îâåðêèëü óæå áûë - ñìîòðèì, à ÷òî åñòü ïî âõîäó-âûõîäó if(SlalomZigBuffer[shift]==0.0 && SlalomZagBuffer[shift]==0.0 && first==false) Slalom_With_A_Scalpel(); } return; } //+------------------------------------------------------------------+ //| | //+------------------------------------------------------------------+ void Shift_Zerro() { shift=0; Navel=(5*Close[0]+2*Open[0]+High[0]+Low[0])/9; Slalom_With_A_Scalpel(); KeelOverZigAndZagSECTION[0]=Navel; return; } //+------------------------------------------------------------------+ //| | //+------------------------------------------------------------------+ void Slalom_With_A_Scalpel() { // Ïðîâåðÿåì ñóùåñòâóþùèé ñèãíàë íà èìååò ïðàâî áûòü // èëè íà åñëè íå ñòîèò, à õîòåëîñü áû: // åñëè õîä ÷èñòî êîíêðåòíî ïî æèçíè - çàáèâàåì Ñòðåëêó íà äåíüãè, // åñëè ïðîòèâ - ñòàâèì íà øóõåð Øàðèêà Äåëàé-Íîãè if(LastZigOrZag=="Zig") { if(TrendUp==true) { if((Navel-LastSlalomZig)>=LimitPoints && SetBuyOrder==false) { SetBuyOrder=true; BuyOrdersBuffer[shift]=Low[shift+1]; LastSlalomZigPos=shift; } if(Navel<=LastSlalomZig && SetBuyOrder==true) { SetBuyOrder=false; BuyOrdersBuffer[LastSlalomZigPos]=0.0; LastSlalomZigPos=-1; } } if(TrendUp==false) { if(Navel>LastSlalomZig && SetLimitOrder==false) { SetLimitOrder=true; LimitOrdersBuffer[shift]=Navel; // LimitOrdersBuffer[shift]=Close[shift]; LastSlalomZigPos=shift; } if(Navel<=LastSlalomZig && SetLimitOrder==true) { SetLimitOrder=false; LimitOrdersBuffer[LastSlalomZigPos]=0.0; LastSlalomZigPos=-1; } } } if(LastZigOrZag=="Zag") { if(TrendUp==false) { if((LastSlalomZag-Navel)>=LimitPoints && SetSellOrder==false) { SetSellOrder=true; SellOrdersBuffer[shift]=High[shift+1]; LastSlalomZagPos=shift; } if(Navel>=LastSlalomZag && SetSellOrder==true) { SetSellOrder=false; SellOrdersBuffer[LastSlalomZagPos]=0.0; LastSlalomZagPos=-1; } } if(TrendUp==true) { if(LastSlalomZag>Navel && SetLimitOrder==false) { SetLimitOrder=true; LimitOrdersBuffer[shift]=Navel; // LimitOrdersBuffer[shift]=Close[shift]; LastSlalomZagPos=shift; } if(Navel>=LastSlalomZag && SetLimitOrder==true) { SetLimitOrder=false; LimitOrdersBuffer[LastSlalomZagPos]=0.0; LastSlalomZagPos=-1; } } } return; } //+--Ñîáñòâåííî, ÿ âñå ñêàçàë. Çàáàâíî, åñëè âñå ýòî ðàáîòàòü áóäåò--+ //+------------------------------------------------------------------+  
zignale indicator
  2
  0
  142
free  22 Sep 2022
@version=4 Di Mihkel00 Questo script è progettato per il metodo NNFX, quindi è consigliato solo per i grafici giornalieri. Ho provato a implementare alcune regole VP NNFX Questo script ha un SSL / Baseline (è possibile scegliere tra SSL o MA), un SSL secondario per le negoziazioni di continiuation e un terzo SSL per le negoziazioni di uscita. Avvisi aggiunti per le voci baseline, le continuazioni SSL2, le uscite. Baseline ha un'impostazione Keltner Channel per le candele grigie "in zona" Aggiunti diamanti "Candle Size > 1 ATR" dal mio vecchio script con i criteri di essere all'interno dell'intervallo ATR di base. Crediti Strategia causecelebre https://www.tradingview.com/u/causecelebre/ Canale SSL ErwinBeckers https://www.tradingview.com/u/ErwinBeckers/ Medie mobili jiehonglim https://www.tradingview.com/u/jiehonglim/ Le medie mobili generano https://www.tradingview.com/u/everget/ Sceneggiatura di "Molte medie mobili" Fractured https://www.tradingview.com/u/Fractured/ study("SSL Hybrid", overlay=true) show_Baseline = input(title="Show Baseline", type=input.bool, defval=true) show_SSL1 = input(title="Mostra SSL1", type=input.bool, defval=false) show_atr = input(title="Mostra bande ATR", type=input.bool, defval=true) Atr atrlen = input(14, "Periodo ATR") mult = input(1, "ATR Multi", step=0.1) smoothing = input(title="ATR Smoothing", defval="WMA", options=["RMA", "SMA", "EMA", "WMA"])   ma_function(source, atrlen) = > se levigante == "RMA" rma(fonte, atrlen) altro se levigante == "SMA" sma(fonte, atrlen) altro se levigante == "EMA" ema(fonte, atrlen) altro wma(fonte, atrlen) atr_slen = ma_function(tr(true), atrlen) ATR Up/Low Bands upper_band = atr_slen * mult + chiudi lower_band = chiudi - atr_slen * mult   BASELINE / SSL1 / SSL2 / VALORI DI MEDIA MOBILE IN USCITA maType = input(title="SSL1 / Baseline Type", type=input.string, defval="HMA", options=["SMA","EMA","DEMA","TEMA","LSMA","WMA","MF","VAMA","TMA","HMA", "JMA", "Kijun v2", "EDSMA","McGinley"]) len = input(title="SSL1 / Baseline Length", defval=60)   SSL2Type = input(title="SSL2 / Continuation Type", type=input.string, defval="JMA", options=["SMA","EMA","DEMA","TEMA","WMA","MF","VAMA","TMA","HMA", "JMA","McGinley"]) len2 = input(title="SSL 2 Length", defval=5) // SSL3Type = input(title="EXIT Type", type=input.string, defval="HMA", options=["DEMA","TEMA","LSMA","VAMA","TMA","HMA","JMA", "Kijun v2", "McGinley", "MF"]) len3 = input(title="LUNGHEZZA USCITA", defval=15) src = input(title="Source", type=input.source, defval=close)   // tema(src, len) =>     ema1 = ema(src, len)     ema2 = ema(ema1, len)     ema3 = ema(ema2, len)     (3 * ema1) - (3 * ema2) + ema3 kidiv = input(defval=1,maxval=4,  title="Kijun MOD Divider")   jurik_phase = input(title="* Jurik (JMA) Only - Phase", type=input.integer, defval=3) jurik_power = input(title="* Jurik (JMA) Only - Power", type=input.integer, defval=1) volatility_lookback = input(10, title="* Volatility Adjusted (VAMA) Only - Volatility lookback length") Mf beta = input(0.8,minval=0;maxval=1;step=0.1, title="Filtro modulare, solo filtro generale - Beta") feedback = input(false, title="Solo filtro modulare - Feedback") z = input(0.5;title="Modular Filter Only - Feedback Weighting",step=0.1, minval=0, maxval=1) EDSMA · ssfLength = input(title="EDSMA - Super Smoother Filter Length", type=input.integer, minval=1, defval=20) ssfPoles = input(title="EDSMA - Super Smoother Filter Poles", type=input.integer, defval=2, options=[2, 3])   //----   EDSMA · get2PoleSSF(src, lunghezza) = >     PI = 2 * asin(1) arg = sqrt(2) * PI / lunghezza     a1 = exp(-arg)     b1 = 2 * a1 * cos(arg)     c2 = b1     c3 = -pow(a1, 2)     c1 = 1 - c2 - c3     ssf = 0,0     ssf := c1 * src + c2 * nz(ssf[1]) + c3 * nz(ssf[2])   get3PoleSSF(src, lunghezza) = >     PI = 2 * asin(1)   arg = PI / lunghezza     a1 = exp(-arg)     b1 = 2 * a1 * cos(1.738 * arg)     c1 = pow(a1, 2)       coef2 = b1 + c1     coef3 = -(c1 + b1 * c1)     coef4 = pow(c1, 2)     coef1 = 1 - coef2 - coef3 - coef4   ssf = 0,0     ssf := coef1 * src + coef2 * nz(ssf[1]) + coef3 * nz(ssf[2]) + coef4 * nz(ssf[3])   ma(type, src, len) = > risultato float = 0 se tipo=="TMA" risultato := sma(sma(src, ceil(len / 2)), floor(len / 2) + 1)     if type=="MF"         ts=0.,b=0.,c=0.,os=0.         //----         alpha = 2/(len+1)         a = feedback ? z*src + (1-z)*nz(ts[1],src) : src         //----         b := a > alpha*a+(1-alpha)*nz(b[1],a) ? a : alpha*a+(1-alpha)*nz(b[1],a)         c := a < alpha*a+(1-alpha)*nz(c[1],a) ? a : alpha*a+(1-alpha)*nz(c[1],a)         os := a == b ? 1 : a == c ? 0 : os[1]         //----         upper = beta*b+(1-beta)*c         lower = beta*c+(1-beta)*b         ts := os*upper+(1-os)*lower         result := ts     if type=="LSMA"         result := linreg(src, len, 0)     if type=="SMA" // Simple         result := sma(src, len)     if type=="EMA" // Exponential         result := ema(src, len)     if type=="DEMA" // Double Exponential         e = ema(src, len)         result := 2 * e - ema(e, len)     if type=="TEMA" // Triple Exponential         e = ema(src, len)         result := 3 * (e - ema(e, len)) + ema(ema(e, len), len)     if type=="WMA" // Weighted         result := wma(src, len)     if type=="VAMA" // Volatility Adjusted         /// Copyright © 2019 to present, Joris Duyck (JD)         mid=ema(src,len)         dev=src-mid         vol_up=highest(dev,volatility_lookback)         vol_down=lowest(dev,volatility_lookback)         result := mid+avg(vol_up,vol_down)     if type=="HMA" // Hull         result := wma(2 * wma(src, len / 2) - wma(src, len), round(sqrt(len)))     if type=="JMA" // Jurik         /// Copyright © 2018 Alex Orekhov (everget)         /// Copyright © 2017 Jurik Research and Consulting.         phaseRatio = jurik_phase < -100 ? 0.5 : jurik_phase > 100 ? 2.5 : jurik_phase / 100 + 1.5         beta = 0.45 * (len - 1) / (0.45 * (len - 1) + 2)         alpha = pow(beta, jurik_power)         jma = 0.0         e0 = 0.0         e0 := (1 - alpha) * src + alpha * nz(e0[1])         e1 = 0.0         e1 := (src - e0) * (1 - beta) + beta * nz(e1[1])         e2 = 0.0         e2 := (e0 + phaseRatio * e1 - nz(jma[1])) * pow(1 - alpha, 2) + pow(alpha, 2) * nz(e2[1])         jma := e2 + nz(jma[1])         result := jma     if type=="Kijun v2"         kijun = avg(lowest(len), highest(len))//, (open + close)/2)         conversionLine = avg(lowest(len/kidiv), highest(len/kidiv))         delta = (kijun + conversionLine)/2         result :=delta     if type=="McGinley"         mg = 0.0         mg := na(mg[1]) ? ema(src, len) : mg[1] + (src - mg[1]) / (len * pow(src/mg[1], 4))         result :=mg     if type=="EDSMA"             zeros = src - nz(src[2])         avgZeros = (zeros + zeros[1]) / 2                 // Ehlers Super Smoother Filter         ssf = ssfPoles == 2              ? get2PoleSSF(avgZeros, ssfLength)              : get3PoleSSF(avgZeros, ssfLength)                 // Rescale filter in terms of Standard Deviations         stdev = stdev(ssf, len)         scaledFilter = stdev != 0              ? ssf / stdev              : 0                 alpha = 5 * abs(scaledFilter) / len                 edsma = 0.0         edsma := alpha * src + (1 - alpha) * nz(edsma[1])         result :=  edsma     result     ///SSL 1 and SSL2 emaHigh = ma(maType, high, len) emaLow = ma(maType, low, len)   maHigh = ma(SSL2Type, high, len2) maLow = ma(SSL2Type, low, len2)   ///EXIT ExitHigh = ma(SSL3Type, high, len3) ExitLow = ma(SSL3Type, low, len3)   ///Keltner Baseline Channel BBMC = ma(maType, close, len) useTrueRange = input(true) multy = input(0.2, step=0.05, title="Base Channel Multiplier") Keltma = ma(maType, src, len) range = useTrueRange ? tr : high - low rangema = ema(range, len) upperk =Keltma + rangema * multy lowerk = Keltma - rangema * multy   //Baseline Violation Candle open_pos =  open*1 close_pos = close*1 difference = abs(close_pos-open_pos) atr_violation = difference > atr_slen InRange = upper_band > BBMC and lower_band < BBMC candlesize_violation = atr_violation and InRange plotshape(candlesize_violation, color=color.white, size=size.tiny,style=shape.diamond, location=location.top, transp=0,title="Candle Size > 1xATR")   //SSL1 VALUES Hlv = int(na) Hlv := close > emaHigh ? 1 : close < emaLow ? -1 : Hlv[1] sslDown = Hlv < 0 ? emaHigh : emaLow   //SSL2 VALUES Hlv2 = int(na) Hlv2 := close > maHigh ? 1 : close < maLow ? -1 : Hlv2[1] sslDown2 = Hlv2 < 0 ? maHigh : maLow   //EXIT VALUES Hlv3 = int(na) Hlv3 := close > ExitHigh ? 1 : close < ExitLow ? -1 : Hlv3[1] sslExit = Hlv3 < 0 ? ExitHigh : ExitLow base_cross_Long = crossover(close, sslExit) base_cross_Short = crossover(sslExit, close) codiff = base_cross_Long ? 1 : base_cross_Short ? -1 : na   //COLORS show_color_bar = input(title="Color Bars", type=input.bool, defval=true) color_bar = close > upperk ? #00c3ff : close < lowerk ? #ff0062 : color.gray color_ssl1 = close > sslDown ? #00c3ff : close < sslDown ? #ff0062 : na   //PLOTS plotarrow(codiff, colorup=#00c3ff, colordown=#ff0062,title="Exit Arrows", transp=20, maxheight=20, offset=0) p1 = plot(show_Baseline ? BBMC : na, color=color_bar, linewidth=4,transp=0, title='MA Baseline') DownPlot = plot( show_SSL1 ? sslDown : na, title="SSL1", linewidth=3, color=color_ssl1, transp=10) barcolor(show_color_bar ? color_bar : na) up_channel = plot(show_Baseline ? upperk : na, color=color_bar, title="Baseline Upper Channel") low_channel = plot(show_Baseline ? lowerk : na, color=color_bar, title="Basiline Lower Channel") fill(up_channel, low_channel, color=color_bar, transp=90)   ////SSL2 Continiuation from ATR atr_crit = input(0.9, step=0.1, title="Continuation ATR Criteria") upper_half = atr_slen * atr_crit + close lower_half = close - atr_slen * atr_crit buy_inatr =  lower_half < sslDown2 sell_inatr = upper_half > sslDown2 sell_cont = close < BBMC and close < sslDown2 buy_cont = close > BBMC and close > sslDown2 sell_atr = sell_inatr and sell_cont buy_atr = buy_inatr e buy_cont atr_fill = buy_atr ? color.green : sell_atr ? color.purple : color.white LongPlot = plot(sslDown2, title="SSL2", linewidth=2, color=atr_fill, style=plot.style_circles, transp=0) u = plot(show_atr ? upper_band : na, "+ATR", color=color.white, transp=80) l = plot(show_atr ? lower_band : na, "-ATR", color=color.white, transp=80)   AVVISI alertcondition(crossover(close, sslDown), title='SSL Cross Alert', message='SSL1 has crossed.') alertcondition(crossover(close, sslDown2), title='SSL2 Cross Alert', message='SSL2 has crossed.') alertcondition(sell_atr, title='Vendi continuazione', message='Vendi continuazione.') alertcondition(buy_atr, title='Buy Continuation', message='Buy Continuation.') alertcondition(crossover(close, sslExit), title='Exit Sell', message='Exit Sell Alert.') alertcondition(crossover(sslExit, close), title='Exit Buy', message='Exit Buy Alert.') alertcondition(crossover(close, upperk ), title='Baseline Buy Entry', message='Base Buy Alert.') alertcondition(crossover(lowerk, close ), title='Baseline Sell Entry', message='Base Sell Alert.')
zignale indicator
  2
  0
  189
free  22 Sep 2022
@version=4 Di Mihkel00 Questo script è progettato per il metodo NNFX, quindi è consigliato solo per i grafici giornalieri. Ho provato a implementare alcune regole VP NNFX Questo script ha un SSL / Baseline (è possibile scegliere tra SSL o MA), un SSL secondario per le negoziazioni di continiuation e un terzo SSL per le negoziazioni di uscita. Avvisi aggiunti per le voci baseline, le continuazioni SSL2, le uscite. Baseline ha un'impostazione Keltner Channel per le candele grigie "in zona" Aggiunti diamanti "Candle Size > 1 ATR" dal mio vecchio script con i criteri di essere all'interno dell'intervallo ATR di base. Crediti Strategia causecelebre https://www.tradingview.com/u/causecelebre/ Canale SSL ErwinBeckers https://www.tradingview.com/u/ErwinBeckers/ Medie mobili jiehonglim https://www.tradingview.com/u/jiehonglim/ Le medie mobili generano https://www.tradingview.com/u/everget/ Sceneggiatura di "Molte medie mobili" Fractured https://www.tradingview.com/u/Fractured/ study("SSL Hybrid", overlay=true) show_Baseline = input(title="Show Baseline", type=input.bool, defval=true) show_SSL1 = input(title="Mostra SSL1", type=input.bool, defval=false) show_atr = input(title="Mostra bande ATR", type=input.bool, defval=true) Atr atrlen = input(14, "Periodo ATR") mult = input(1, "ATR Multi", step=0.1) smoothing = input(title="ATR Smoothing", defval="WMA", options=["RMA", "SMA", "EMA", "WMA"])   ma_function(source, atrlen) = > se levigante == "RMA" rma(fonte, atrlen) altro se levigante == "SMA" sma(fonte, atrlen) altro se levigante == "EMA" ema(fonte, atrlen) altro wma(fonte, atrlen) atr_slen = ma_function(tr(true), atrlen) ATR Up/Low Bands upper_band = atr_slen * mult + chiudi lower_band = chiudi - atr_slen * mult   BASELINE / SSL1 / SSL2 / VALORI DI MEDIA MOBILE IN USCITA maType = input(title="SSL1 / Baseline Type", type=input.string, defval="HMA", options=["SMA","EMA","DEMA","TEMA","LSMA","WMA","MF","VAMA","TMA","HMA", "JMA", "Kijun v2", "EDSMA","McGinley"]) len = input(title="SSL1 / Baseline Length", defval=60)   SSL2Type = input(title="SSL2 / Continuation Type", type=input.string, defval="JMA", options=["SMA","EMA","DEMA","TEMA","WMA","MF","VAMA","TMA","HMA", "JMA","McGinley"]) len2 = input(title="SSL 2 Length", defval=5) // SSL3Type = input(title="EXIT Type", type=input.string, defval="HMA", options=["DEMA","TEMA","LSMA","VAMA","TMA","HMA","JMA", "Kijun v2", "McGinley", "MF"]) len3 = input(title="LUNGHEZZA USCITA", defval=15) src = input(title="Source", type=input.source, defval=close)   // tema(src, len) =>     ema1 = ema(src, len)     ema2 = ema(ema1, len)     ema3 = ema(ema2, len)     (3 * ema1) - (3 * ema2) + ema3 kidiv = input(defval=1,maxval=4,  title="Kijun MOD Divider")   jurik_phase = input(title="* Jurik (JMA) Only - Phase", type=input.integer, defval=3) jurik_power = input(title="* Jurik (JMA) Only - Power", type=input.integer, defval=1) volatility_lookback = input(10, title="* Volatility Adjusted (VAMA) Only - Volatility lookback length") Mf beta = input(0.8,minval=0;maxval=1;step=0.1, title="Filtro modulare, solo filtro generale - Beta") feedback = input(false, title="Solo filtro modulare - Feedback") z = input(0.5;title="Modular Filter Only - Feedback Weighting",step=0.1, minval=0, maxval=1) EDSMA · ssfLength = input(title="EDSMA - Super Smoother Filter Length", type=input.integer, minval=1, defval=20) ssfPoles = input(title="EDSMA - Super Smoother Filter Poles", type=input.integer, defval=2, options=[2, 3])   //----   EDSMA · get2PoleSSF(src, lunghezza) = >     PI = 2 * asin(1) arg = sqrt(2) * PI / lunghezza     a1 = exp(-arg)     b1 = 2 * a1 * cos(arg)     c2 = b1     c3 = -pow(a1, 2)     c1 = 1 - c2 - c3     ssf = 0,0     ssf := c1 * src + c2 * nz(ssf[1]) + c3 * nz(ssf[2])   get3PoleSSF(src, lunghezza) = >     PI = 2 * asin(1)   arg = PI / lunghezza     a1 = exp(-arg)     b1 = 2 * a1 * cos(1.738 * arg)     c1 = pow(a1, 2)       coef2 = b1 + c1     coef3 = -(c1 + b1 * c1)     coef4 = pow(c1, 2)     coef1 = 1 - coef2 - coef3 - coef4   ssf = 0,0     ssf := coef1 * src + coef2 * nz(ssf[1]) + coef3 * nz(ssf[2]) + coef4 * nz(ssf[3])   ma(type, src, len) = > risultato float = 0 se tipo=="TMA" risultato := sma(sma(src, ceil(len / 2)), floor(len / 2) + 1)     if type=="MF"         ts=0.,b=0.,c=0.,os=0.         //----         alpha = 2/(len+1)         a = feedback ? z*src + (1-z)*nz(ts[1],src) : src         //----         b := a > alpha*a+(1-alpha)*nz(b[1],a) ? a : alpha*a+(1-alpha)*nz(b[1],a)         c := a < alpha*a+(1-alpha)*nz(c[1],a) ? a : alpha*a+(1-alpha)*nz(c[1],a)         os := a == b ? 1 : a == c ? 0 : os[1]         //----         upper = beta*b+(1-beta)*c         lower = beta*c+(1-beta)*b         ts := os*upper+(1-os)*lower         result := ts     if type=="LSMA"         result := linreg(src, len, 0)     if type=="SMA" // Simple         result := sma(src, len)     if type=="EMA" // Exponential         result := ema(src, len)     if type=="DEMA" // Double Exponential         e = ema(src, len)         result := 2 * e - ema(e, len)     if type=="TEMA" // Triple Exponential         e = ema(src, len)         result := 3 * (e - ema(e, len)) + ema(ema(e, len), len)     if type=="WMA" // Weighted         result := wma(src, len)     if type=="VAMA" // Volatility Adjusted         /// Copyright © 2019 to present, Joris Duyck (JD)         mid=ema(src,len)         dev=src-mid         vol_up=highest(dev,volatility_lookback)         vol_down=lowest(dev,volatility_lookback)         result := mid+avg(vol_up,vol_down)     if type=="HMA" // Hull         result := wma(2 * wma(src, len / 2) - wma(src, len), round(sqrt(len)))     if type=="JMA" // Jurik         /// Copyright © 2018 Alex Orekhov (everget)         /// Copyright © 2017 Jurik Research and Consulting.         phaseRatio = jurik_phase < -100 ? 0.5 : jurik_phase > 100 ? 2.5 : jurik_phase / 100 + 1.5         beta = 0.45 * (len - 1) / (0.45 * (len - 1) + 2)         alpha = pow(beta, jurik_power)         jma = 0.0         e0 = 0.0         e0 := (1 - alpha) * src + alpha * nz(e0[1])         e1 = 0.0         e1 := (src - e0) * (1 - beta) + beta * nz(e1[1])         e2 = 0.0         e2 := (e0 + phaseRatio * e1 - nz(jma[1])) * pow(1 - alpha, 2) + pow(alpha, 2) * nz(e2[1])         jma := e2 + nz(jma[1])         result := jma     if type=="Kijun v2"         kijun = avg(lowest(len), highest(len))//, (open + close)/2)         conversionLine = avg(lowest(len/kidiv), highest(len/kidiv))         delta = (kijun + conversionLine)/2         result :=delta     if type=="McGinley"         mg = 0.0         mg := na(mg[1]) ? ema(src, len) : mg[1] + (src - mg[1]) / (len * pow(src/mg[1], 4))         result :=mg     if type=="EDSMA"             zeros = src - nz(src[2])         avgZeros = (zeros + zeros[1]) / 2                 // Ehlers Super Smoother Filter         ssf = ssfPoles == 2              ? get2PoleSSF(avgZeros, ssfLength)              : get3PoleSSF(avgZeros, ssfLength)                 // Rescale filter in terms of Standard Deviations         stdev = stdev(ssf, len)         scaledFilter = stdev != 0              ? ssf / stdev              : 0                 alpha = 5 * abs(scaledFilter) / len                 edsma = 0.0         edsma := alpha * src + (1 - alpha) * nz(edsma[1])         result :=  edsma     result     ///SSL 1 and SSL2 emaHigh = ma(maType, high, len) emaLow = ma(maType, low, len)   maHigh = ma(SSL2Type, high, len2) maLow = ma(SSL2Type, low, len2)   ///EXIT ExitHigh = ma(SSL3Type, high, len3) ExitLow = ma(SSL3Type, low, len3)   ///Keltner Baseline Channel BBMC = ma(maType, close, len) useTrueRange = input(true) multy = input(0.2, step=0.05, title="Base Channel Multiplier") Keltma = ma(maType, src, len) range = useTrueRange ? tr : high - low rangema = ema(range, len) upperk =Keltma + rangema * multy lowerk = Keltma - rangema * multy   //Baseline Violation Candle open_pos =  open*1 close_pos = close*1 difference = abs(close_pos-open_pos) atr_violation = difference > atr_slen InRange = upper_band > BBMC and lower_band < BBMC candlesize_violation = atr_violation and InRange plotshape(candlesize_violation, color=color.white, size=size.tiny,style=shape.diamond, location=location.top, transp=0,title="Candle Size > 1xATR")   //SSL1 VALUES Hlv = int(na) Hlv := close > emaHigh ? 1 : close < emaLow ? -1 : Hlv[1] sslDown = Hlv < 0 ? emaHigh : emaLow   //SSL2 VALUES Hlv2 = int(na) Hlv2 := close > maHigh ? 1 : close < maLow ? -1 : Hlv2[1] sslDown2 = Hlv2 < 0 ? maHigh : maLow   //EXIT VALUES Hlv3 = int(na) Hlv3 := close > ExitHigh ? 1 : close < ExitLow ? -1 : Hlv3[1] sslExit = Hlv3 < 0 ? ExitHigh : ExitLow base_cross_Long = crossover(close, sslExit) base_cross_Short = crossover(sslExit, close) codiff = base_cross_Long ? 1 : base_cross_Short ? -1 : na   //COLORS show_color_bar = input(title="Color Bars", type=input.bool, defval=true) color_bar = close > upperk ? #00c3ff : close < lowerk ? #ff0062 : color.gray color_ssl1 = close > sslDown ? #00c3ff : close < sslDown ? #ff0062 : na   //PLOTS plotarrow(codiff, colorup=#00c3ff, colordown=#ff0062,title="Exit Arrows", transp=20, maxheight=20, offset=0) p1 = plot(show_Baseline ? BBMC : na, color=color_bar, linewidth=4,transp=0, title='MA Baseline') DownPlot = plot( show_SSL1 ? sslDown : na, title="SSL1", linewidth=3, color=color_ssl1, transp=10) barcolor(show_color_bar ? color_bar : na) up_channel = plot(show_Baseline ? upperk : na, color=color_bar, title="Baseline Upper Channel") low_channel = plot(show_Baseline ? lowerk : na, color=color_bar, title="Basiline Lower Channel") fill(up_channel, low_channel, color=color_bar, transp=90)   ////SSL2 Continiuation from ATR atr_crit = input(0.9, step=0.1, title="Continuation ATR Criteria") upper_half = atr_slen * atr_crit + close lower_half = close - atr_slen * atr_crit buy_inatr =  lower_half < sslDown2 sell_inatr = upper_half > sslDown2 sell_cont = close < BBMC and close < sslDown2 buy_cont = close > BBMC and close > sslDown2 sell_atr = sell_inatr and sell_cont buy_atr = buy_inatr e buy_cont atr_fill = buy_atr ? color.green : sell_atr ? color.purple : color.white LongPlot = plot(sslDown2, title="SSL2", linewidth=2, color=atr_fill, style=plot.style_circles, transp=0) u = plot(show_atr ? upper_band : na, "+ATR", color=color.white, transp=80) l = plot(show_atr ? lower_band : na, "-ATR", color=color.white, transp=80)   AVVISI alertcondition(crossover(close, sslDown), title='SSL Cross Alert', message='SSL1 has crossed.') alertcondition(crossover(close, sslDown2), title='SSL2 Cross Alert', message='SSL2 has crossed.') alertcondition(sell_atr, title='Vendi continuazione', message='Vendi continuazione.') alertcondition(buy_atr, title='Buy Continuation', message='Buy Continuation.') alertcondition(crossover(close, sslExit), title='Exit Sell', message='Exit Sell Alert.') alertcondition(crossover(sslExit, close), title='Exit Buy', message='Exit Buy Alert.') alertcondition(crossover(close, upperk ), title='Baseline Buy Entry', message='Base Buy Alert.') alertcondition(crossover(lowerk, close ), title='Baseline Sell Entry', message='Base Sell Alert.')
zignale indicator
  2
  0
  254
free  23 Sep 2022
//@version=4 //By Glaz, Modified // study("QQE MOD") RSI_Period = input(6, title='RSI Length') SF = input(5, title='RSI Smoothing') QQE = input(3, title='Fast QQE Factor') ThreshHold = input(3, title="Thresh-hold") //   src = input(close, title="RSI Source") //   // Wilders_Period = RSI_Period * 2 - 1   Rsi = rsi(src, RSI_Period) RsiMa = ema(Rsi, SF) AtrRsi = abs(RsiMa[1] - RsiMa) MaAtrRsi = ema(AtrRsi, Wilders_Period) dar = ema(MaAtrRsi, Wilders_Period) * QQE   longband = 0.0 shortband = 0.0 trend = 0   DeltaFastAtrRsi = dar RSIndex = RsiMa newshortband = RSIndex + DeltaFastAtrRsi newlongband = RSIndex - DeltaFastAtrRsi longband := RSIndex[1] > longband[1] and RSIndex > longband[1] ?    max(longband[1], newlongband) : newlongband shortband := RSIndex[1] < shortband[1] and RSIndex < shortband[1] ?    min(shortband[1], newshortband) : newshortband cross_1 = cross(longband[1], RSIndex) trend := cross(RSIndex, shortband[1]) ? 1 : cross_1 ? -1 : nz(trend[1], 1) FastAtrRsiTL = trend == 1 ? longband : shortband ////////////////////   length = input(50, minval=1, title="Bollinger Length") mult = input(0.35, minval=0.001, maxval=5, step=0.1, title="BB Multiplier") basis = sma(FastAtrRsiTL - 50, length) dev = mult * stdev(FastAtrRsiTL - 50, length) upper = basis + dev lower = basis - dev color_bar = RsiMa - 50 > upper ? #00c3ff : RsiMa - 50 < lower ? #ff0062 : color.gray   // // Zero cross QQEzlong = 0 QQEzlong := nz(QQEzlong[1]) QQEzshort = 0 QQEzshort := nz(QQEzshort[1]) QQEzlong := RSIndex >= 50 ? QQEzlong + 1 : 0 QQEzshort := RSIndex < 50 ? QQEzshort + 1 : 0 //     Zero = hline(0, color=color.white, linestyle=hline.style_dotted, linewidth=1)   ////////////////////////////////////////////////////////////////   RSI_Period2 = input(6, title='RSI Length') SF2 = input(5, title='RSI Smoothing') QQE2 = input(1.61, title='Fast QQE2 Factor') ThreshHold2 = input(3, title="Thresh-hold")   src2 = input(close, title="RSI Source") //   // Wilders_Period2 = RSI_Period2 * 2 - 1   Rsi2 = rsi(src2, RSI_Period2) RsiMa2 = ema(Rsi2, SF2) AtrRsi2 = abs(RsiMa2[1] - RsiMa2) MaAtrRsi2 = ema(AtrRsi2, Wilders_Period2) dar2 = ema(MaAtrRsi2, Wilders_Period2) * QQE2 longband2 = 0.0 shortband2 = 0.0 trend2 = 0   DeltaFastAtrRsi2 = dar2 RSIndex2 = RsiMa2 newshortband2 = RSIndex2 + DeltaFastAtrRsi2 newlongband2 = RSIndex2 - DeltaFastAtrRsi2 longband2 := RSIndex2[1] > longband2[1] and RSIndex2 > longband2[1] ?    max(longband2[1], newlongband2) : newlongband2 shortband2 := RSIndex2[1] < shortband2[1] and RSIndex2 < shortband2[1] ?    min(shortband2[1], newshortband2) : newshortband2 cross_2 = cross(longband2[1], RSIndex2) trend2 := cross(RSIndex2, shortband2[1]) ? 1 : cross_2 ? -1 : nz(trend2[1], 1) FastAtrRsi2TL = trend2 == 1 ? longband2 : shortband2   // // Zero cross QQE2zlong = 0 QQE2zlong := nz(QQE2zlong[1]) QQE2zshort = 0 QQE2zshort := nz(QQE2zshort[1]) QQE2zlong := RSIndex2 >= 50 ? QQE2zlong + 1 : 0 QQE2zshort := RSIndex2 < 50 ? QQE2zshort + 1 : 0 //     hcolor2 = RsiMa2 - 50 > ThreshHold2 ? color.silver :    RsiMa2 - 50 < 0 - ThreshHold2 ? color.silver : na plot(FastAtrRsi2TL - 50, title='QQE Line', color=color.white, transp=0, linewidth=2) plot(RsiMa2 - 50, color=hcolor2, transp=50, title='Histo2', style=plot.style_columns)   Greenbar1 = RsiMa2 - 50 > ThreshHold2 Greenbar2 = RsiMa - 50 > superiore   Redbar1 = RsiMa2 - 50 < 0 - ThreshHold2 Redbar2 = RsiMa - 50 < inferiore trama(Greenbar1 e Greenbar2 == 1 ? RsiMa2 - 50 : na, title="QQE Up", style=plot.style_columns, color=#00c3ff, transp=0) trama(Redbar1 e Redbar2 == 1 ? RsiMa2 - 50 : na, title="QQE Down", style=plot.style_columns, color=#ff0062, transp=0)  
ZIGNALE OSCILLATOR
  4
  0
  249
free  23 Sep 2022
@version=4 Di Mihkel00 Questo script è progettato per il metodo NNFX, quindi è consigliato solo per i grafici giornalieri. Ho provato a implementare alcune regole VP NNFX Questo script ha un SSL / Baseline (è possibile scegliere tra SSL o MA), un SSL secondario per le negoziazioni di continiuation e un terzo SSL per le negoziazioni di uscita. Avvisi aggiunti per le voci baseline, le continuazioni SSL2, le uscite. Baseline ha un'impostazione Keltner Channel per le candele grigie "in zona" Aggiunti diamanti "Candle Size > 1 ATR" dal mio vecchio script con i criteri di essere all'interno dell'intervallo ATR di base. Crediti Strategia causecelebre https://www.tradingview.com/u/causecelebre/ Canale SSL ErwinBeckers https://www.tradingview.com/u/ErwinBeckers/ Medie mobili jiehonglim https://www.tradingview.com/u/jiehonglim/ Le medie mobili generano https://www.tradingview.com/u/everget/ Sceneggiatura di "Molte medie mobili" Fractured https://www.tradingview.com/u/Fractured/ study("SSL Hybrid", overlay=true) show_Baseline = input(title="Show Baseline", type=input.bool, defval=true) show_SSL1 = input(title="Mostra SSL1", type=input.bool, defval=false) show_atr = input(title="Mostra bande ATR", type=input.bool, defval=true) Atr atrlen = input(14, "Periodo ATR") mult = input(1, "ATR Multi", step=0.1) smoothing = input(title="ATR Smoothing", defval="WMA", options=["RMA", "SMA", "EMA", "WMA"])   ma_function(source, atrlen) = > se levigante == "RMA" rma(fonte, atrlen) altro se levigante == "SMA" sma(fonte, atrlen) altro se levigante == "EMA" ema(fonte, atrlen) altro wma(fonte, atrlen) atr_slen = ma_function(tr(true), atrlen) ATR Up/Low Bands upper_band = atr_slen * mult + chiudi lower_band = chiudi - atr_slen * mult   BASELINE / SSL1 / SSL2 / VALORI DI MEDIA MOBILE IN USCITA maType = input(title="SSL1 / Baseline Type", type=input.string, defval="HMA", options=["SMA","EMA","DEMA","TEMA","LSMA","WMA","MF","VAMA","TMA","HMA", "JMA", "Kijun v2", "EDSMA","McGinley"]) len = input(title="SSL1 / Baseline Length", defval=60)   SSL2Type = input(title="SSL2 / Continuation Type", type=input.string, defval="JMA", options=["SMA","EMA","DEMA","TEMA","WMA","MF","VAMA","TMA","HMA", "JMA","McGinley"]) len2 = input(title="SSL 2 Length", defval=5) // SSL3Type = input(title="EXIT Type", type=input.string, defval="HMA", options=["DEMA","TEMA","LSMA","VAMA","TMA","HMA","JMA", "Kijun v2", "McGinley", "MF"]) len3 = input(title="LUNGHEZZA USCITA", defval=15) src = input(title="Source", type=input.source, defval=close)   // tema(src, len) = >     ema1 = ema(src, len)     ema2 = ema(ema1, len)     ema3 = ema(ema2, len)     (3 * ema1) - (3 * ema2) + ema3 kidiv = input(defval=1,maxval=4,  title="Kijun MOD Divider")   jurik_phase = input(title="* Jurik (JMA) Only - Phase", type=input.integer, defval=3) jurik_power = input(title="* Jurik (JMA) Only - Power", type=input.integer, defval=1) volatility_lookback = input(10, title="* Volatility Adjusted (VAMA) Only - Volatility lookback length") Mf beta = input(0.8,minval=0;maxval=1;step=0.1, title="Filtro modulare, solo filtro generale - Beta") feedback = input(false, title="Solo filtro modulare - Feedback") z = input(0.5;title="Modular Filter Only - Feedback Weighting",step=0.1, minval=0, maxval=1) EDSMA · ssfLength = input(title="EDSMA - Super Smoother Filter Length", type=input.integer, minval=1, defval=20) ssfPoles = input(title="EDSMA - Super Smoother Filter Poles", type=input.integer, defval=2, options=[2, 3])   //----   EDSMA · get2PoleSSF(src, lunghezza) = >     PI = 2 * asin(1) arg = sqrt(2) * PI / lunghezza     a1 = exp(-arg)     b1 = 2 * a1 * cos(arg)     c2 = b1     c3 = -pow(a1, 2)     c1 = 1 - c2 - c3     ssf = 0,0     ssf := c1 * src + c2 * nz(ssf[1]) + c3 * nz(ssf[2])   get3PoleSSF(src, lunghezza) = >     PI = 2 * asin(1)   arg = PI / lunghezza     a1 = exp(-arg)     b1 = 2 * a1 * cos(1.738 * arg)     c1 = pow(a1, 2)       coef2 = b1 + c1     coef3 = -(c1 + b1 * c1)     coef4 = pow(c1, 2)     coef1 = 1 - coef2 - coef3 - coef4   ssf = 0,0     ssf := coef1 * src + coef2 * nz(ssf[1]) + coef3 * nz(ssf[2]) + coef4 * nz(ssf[3])   ma(type, src, len) = > risultato float = 0 se tipo=="TMA" risultato := sma(sma(src, ceil(len / 2)), floor(len / 2) + 1)     if type=="MF"         ts=0.,b=0.,c=0.,os=0.         //---- alfa = 2/(len+1)         a = feedback ? z*src + (1-z)*nz(ts[1],src) : src         //---- b := a > alpha*a+(1-alpha)*nz(b[1],a) ? a : alfa*a+(1-alfa)*nz(b[1],a) c := a < alpha*a+(1-alpha)*nz(c[1],a) ? a : alfa*a+(1-alfa)*nz(c[1],a)         os := a == b ? 1 : a == c ? 0 : os[1]         //---- superiore = beta*b+(1-beta)*c inferiore = beta*c+(1-beta)*b         ts := os*upper+(1-os)*lower risultato := ts     if type=="LSMA" risultato := linreg(src, len, 0) if type=="SMA" // Semplice risultato := sma(src, len) if type=="EMA" // Esponenziale risultato := ema(src, len) if type=="DEMA" // Doppio esponenziale         e = ema(src, len) risultato := 2 * e - ema(e, len) if type=="TEMA" // Triplo esponenziale         e = ema(src, len) risultato := 3 * (e - ema(e, len)) + ema(ema(e, len), len) if type=="WMA" // Ponderato risultato := wma(src, len)     if type=="VAMA" // Volatility Adjusted Copyright © dal 2019 ad oggi, Joris Duyck (JD) mid=ema(src;len)         dev=src-mid vol_up=più alto(dev;volatility_lookback) vol_down=più basso(dev;volatility_lookback) risultato := medio+media(vol_up,vol_down) if type=="HMA" // Scafo risultato := wma(2 * wma(src, len / 2) - wma(src, len), round(sqrt(len)))     if type=="JMA" // Jurik Copyright © 2018 Alex Orekhov (everget) Copyright © 2017 Jurik Ricerca e consulenza.         phaseRatio = jurik_phase < -100 ? 0.5 : jurik_phase > 100 ? 2.5 : jurik_phase / 100 + 1.5 beta = 0,45 * (len - 1) / (0,45 * (len - 1) + 2)         alpha = pow(beta, jurik_power) jma = 0,0 e0 = 0,0 e0 := (1 - alfa) * src + alfa * nz(e0[1]) e1 = 0,0         e1 := (src - e0) * (1 - beta) + beta * nz(e1[1]) e2 = 0,0         e2 := (e0 + phaseRatio * e1 - nz(jma[1])) * pow(1 - alpha, 2) + pow(alpha, 2) * nz(e2[1])         jma := e2 + nz(jma[1]) risultato := jma se tipo=="Kijun v2"         kijun = avg(lowest(len), highest(len))//, (open + close)/2)         conversionLine = avg(lowest(len/kidiv), highest(len/kidiv))         delta = (kijun + conversionLine)/2 risultato :=delta     if type=="McGinley" mg = 0,0         mg := na(mg[1]) ? ema(src, len) : mg[1] + (src - mg[1]) / (len * pow(src/mg[1], 4)) risultato :=mg se tipo=="EDSMA"     zero = src - nz(src[2]) avgZeros = (zeri + zeri[1]) / 2         Filtro Ehlers Super Smoother         ssf = ssfPoles == 2              ? get2PoleSSF(avgZeros, ssfLength)              : get3PoleSSF(avgZeros, ssfLength)         Filtro di riscalata in termini di deviazioni standard         stdev = stdev(ssf, len)         scaledFilter = stdev != 0              ? ssf / stdev              : 0         alfa = 5 * abs (scaledFilter) / len         edsma = 0,0 edsma := alfa * src + (1 - alfa) * nz(edsma[1]) risultato := edsma risultato     SSL 1 e SSL2 emaHigh = ma(maType, high, len) emaLow = ma(maType, low, len)   maHigh = ma(SSL2Type, high, len2) maLow = ma(SSL2Type, low, len2)   USCITA ExitHigh = ma(SSL3Type, high, len3) ExitLow = ma(SSL3Type, low, len3)   Canale di base Keltner BBMC = ma(maType, close, len) useTrueRange = input(true) multy = input(0.2, step=0.05, title="Base Channel Multiplier") Keltma = ma(maType, src, len) range = useTrueRange ? tr : alto - basso rangema = ema(range, len) upperk = Keltma + rangema * multy lowerk = Keltma - rangema * multy   Candela di violazione della linea di base open_pos = aperto*1 close_pos = chiudi*1 differenza = abs(close_pos-open_pos) atr_violation = differenza > atr_slen InRange = bbMC upper_band > e BBMC lower_band < candlesize_violation = atr_violation e InRange plotshape(candlesize_violation, color=color.white, size=size.tiny,style=shape.diamond, location=location.top, transp=0,title="Candle Size > 1xATR")   VALORI SSL1 Hlv = int(na) Hlv := close > emaHigh ? 1 : chiudi < emaLow ? -1 : Hlv[1] sslDown = Hlv < 0 ? emaHigh : emaLow   VALORI SSL2 Hlv2 = int(na) Hlv2 := close > maHigh ? 1 : chiudi < maLow ? -1 : Hlv2[1] sslDown2 = Hlv2 < 0 ? maHigh : maLow   VALORI DI USCITA Hlv3 = int(na) Hlv3 := vicino > ExitHigh ? 1 : chiudi < ExitLow ? -1 : Hlv3[1] sslExit = Hlv3 < 0 ? ExitHigh : ExitLow base_cross_Long = crossover(close, sslExit) base_cross_Short = crossover(sslExit, close) codiff = base_cross_Long ? 1 : base_cross_Short ? -1 : na   //COLORS show_color_bar = input(title="Color Bars", type=input.bool, defval=true) color_bar = close > upperk ? #00c3ff : close < lowerk ? #ff0062 : color.gray color_ssl1 = close > sslDown ? #00c3ff : close < sslDown ? #ff0062 : na   //PLOTS plotarrow(codiff, colorup=#00c3ff, colordown=#ff0062,title="Exit Arrows", transp=20, maxheight=20, offset=0) p1 = trama(show_Baseline ? BBMC : na, color=color_bar, linewidth=4,transp=0, title='MA Baseline') DownPlot = plot( show_SSL1 ? sslDown : na, title="SSL1", linewidth=3, color=color_ssl1, transp=10) barcolor(show_color_bar ? color_bar : na) up_channel = plot(show_Baseline ? upperk : na, color=color_bar, title="Baseline Upper Channel") low_channel = plot(show_Baseline ? lowerk : na, color=color_bar, title="Basiline Lower Channel") fill(up_channel, low_channel, color=color_bar, transp=90)   Continiuation SSL2 da ATR atr_crit = input(0.9, step=0.1, title="Criteri ATR di continuazione") upper_half = atr_slen * atr_crit + chiudi lower_half = chiudi - atr_slen * atr_crit buy_inatr =  lower_half < sslDown2 sell_inatr = upper_half > sslDown2 sell_cont = chiudi < BBMC e chiudi < sslDown2 buy_cont = chiudi > BBMC e chiudi > sslDown2 sell_atr = sell_inatr e sell_cont buy_atr = buy_inatr e buy_cont atr_fill = buy_atr ? color.green : sell_atr ? color.purple : color.white LongPlot = plot(sslDown2, title="SSL2", linewidth=2, color=atr_fill, style=plot.style_circles, transp=0) u = plot(show_atr ? upper_band : na, "+ATR", color=color.white, transp=80) l = plot(show_atr ? lower_band : na, "-ATR", color=color.white, transp=80)   AVVISI alertcondition(crossover(close, sslDown), title='SSL Cross Alert', message='SSL1 has crossed.') alertcondition(crossover(close, sslDown2), title='SSL2 Cross Alert', message='SSL2 has crossed.') alertcondition(sell_atr, title='Vendi continuazione', message='Vendi continuazione.') alertcondition(buy_atr, title='Buy Continuation', message='Buy Continuation.') alertcondition(crossover(close, sslExit), title='Exit Sell', message='Exit Sell Alert.') alertcondition(crossover(sslExit, close), title='Exit Buy', message='Exit Buy Alert.') alertcondition(crossover(close, upperk ), title='Baseline Buy Entry', message='Base Buy Alert.') alertcondition(crossover(lowerk, close ), title='Baseline Sell Entry', message='Base Sell Alert.')
ZigZag
  3
  4.17
  3303
by Jiri
free  09 May 2016
Description The ZigZag indicator shows trend lines filtering out changes below a defined level. The Indicator was converted from NinjaTrader script to cAlgo.   Updates 31/01/2016 Released. 08/03/2016 ​Added channels. Updates on tick.   Inputs High source - The source of High DataSeries. Low source - The source of Low DataSeries. Deviation - Value of deviation.   Screenshot   Make a Donation If you like my work and effort then please consider to make a kind donation thru PayPal or any Credit Card at the top right corner.
ZigZag
  1
  5
  5613
free  31 Jul 2016
Another ZigZag indicator for CTrader. I found that the other implementations available were incorrect and written with more lines of code than necessary. http://www.onlinetradingconcepts.com/TechnicalAnalysis/ZigZag.htm  
ZigZag
  6
  5
  22785
free  24 May 2013
The zigzag is an Indicator that is usually used as a filter of small price momements.  
zigzag
  5
  0
  804
free  04 Jun 2022
to help you in choosing the right risk reward ratio for your positions