3 Level ZZ Semafor - Convert MT4 indicator to MT5 -

MQL5 전환

작업 종료됨

실행 시간 4 분
피고용인의 피드백
Всё отлично! Рад сотрудничеству!
고객의 피드백
Amazing developer , fast and delivers quality work. Will definitely work with him again.

명시

Need to convert the attached mt4 3 level zz semafor indicator to mt5 .

Converted mt5 version must function EXACTLY like the mt4 version.

Thanks and good luck! :)


//+------------------------------------------------------------------+ 

//|                                        3_Level_ZZ_Semafor.mq4    | 

//+------------------------------------------------------------------+ 

//| 3_Level_ZZ_Semafor_TRO_MODIFIED_VERSION                          |

//| MODIFIED BY AVERY T. HORTON, JR. AKA THERUMPLEDONE@GMAIL.COM     |

//| I am NOT the ORIGINAL author 

//  and I am not claiming authorship of this indicator. 

//  All I did was modify it. I hope you find my modifications useful.|

//|                                                                  |

//+------------------------------------------------------------------+

 

#property copyright "asystem2000" 

#property link      "asystem2000@yandex.ru" 


#property indicator_chart_window 

#property indicator_buffers 6

#property indicator_color1 Chocolate 

#property indicator_color2 Chocolate 

#property indicator_color3 MediumVioletRed

#property indicator_color4 MediumVioletRed

#property indicator_color5 Yellow

#property indicator_color6 Yellow

//+--------- TRO MODIFICATION ---------------------------------------+ 


//extern bool   Sound.Alert    = false ;

 

//---- input parameters 

extern double Period1=5; 

extern double Period2=13; 

extern double Period3=34; 

extern string   Dev_Step_1="1,3";

extern string   Dev_Step_2="8,5";

extern string   Dev_Step_3="13,8";

extern int Symbol_1_Kod=140;

extern int Symbol_2_Kod=141;

extern int Symbol_3_Kod=142;


//---- buffers 

double FP_BuferUp[];

double FP_BuferDn[]; 

double NP_BuferUp[];

double NP_BuferDn[]; 

double HP_BuferUp[];

double HP_BuferDn[]; 


int F_Period;

int N_Period;

int H_Period;

int Dev1;

int Stp1;

int Dev2;

int Stp2;

int Dev3;

int Stp3;

//+--------- TRO MODIFICATION ---------------------------------------+ 

string symbol, tChartPeriod,  tShortName ;  

int    digits, period  ; 


bool Trigger1,  Trigger2,  Trigger3 ;


int OldBars = -1 ;


color tColor = Yellow ;


//+------------------------------------------------------------------+ 

//| Custom indicator initialization function                         | 

//+------------------------------------------------------------------+ 

int init() 

  { 

//+--------- TRO MODIFICATION ---------------------------------------+  

   period       = Period() ;     

   tChartPeriod =  TimeFrameToString(period) ;

   symbol       =  Symbol() ;

   digits       =  Digits ;   


   tShortName = "tbb"+ symbol + tChartPeriod  ;

    

   

  

// --------- Êîððåêòèðóåì ïåðèîäû äëÿ ïîñòðîåíèÿ ÇèãÇàãîâ

  

  

   if (Period1>0) F_Period=MathCeil(Period1*Period()); else F_Period=0; 

   if (Period2>0) N_Period=MathCeil(Period2*Period()); else N_Period=0; 

   if (Period3>0) H_Period=MathCeil(Period3*Period()); else H_Period=0; 

   

//---- Îáðàáàòûâàåì 1 áóôåð 

   if (Period1>0)

   {

   SetIndexStyle(0,DRAW_ARROW,0,1); 

   SetIndexArrow(0,Symbol_1_Kod); 

   SetIndexBuffer(0,FP_BuferUp); 

   SetIndexEmptyValue(0,0.0); 

   

   SetIndexStyle(1,DRAW_ARROW,0,1); 

   SetIndexArrow(1,Symbol_1_Kod); 

   SetIndexBuffer(1,FP_BuferDn); 

   SetIndexEmptyValue(1,0.0); 

   }

   

//---- Îáðàáàòûâàåì 2 áóôåð 

   if (Period2>0)

   {

   SetIndexStyle(2,DRAW_ARROW,0,2); 

   SetIndexArrow(2,Symbol_2_Kod); 

   SetIndexBuffer(2,NP_BuferUp); 

   SetIndexEmptyValue(2,0.0); 

   

   SetIndexStyle(3,DRAW_ARROW,0,2); 

   SetIndexArrow(3,Symbol_2_Kod); 

   SetIndexBuffer(3,NP_BuferDn); 

   SetIndexEmptyValue(3,0.0); 

   }

//---- Îáðàáàòûâàåì 3 áóôåð 

   if (Period3>0)

   {

   SetIndexStyle(4,DRAW_ARROW,0,4); 

   SetIndexArrow(4,Symbol_3_Kod); 

   SetIndexBuffer(4,HP_BuferUp); 

   SetIndexEmptyValue(4,0.0); 


   SetIndexStyle(5,DRAW_ARROW,0,4); 

   SetIndexArrow(5,Symbol_3_Kod); 

   SetIndexBuffer(5,HP_BuferDn); 

   SetIndexEmptyValue(5,0.0); 

   }

// Îáðàáàòûâàåì çíà÷åíèÿ äåâèàöèé è øàãîâ

   int CDev=0;

   int CSt=0;

   int Mass[]; 

   int C=0;  

   if (IntFromStr(Dev_Step_1,C, Mass)==1) 

      {

        Stp1=Mass[1];

        Dev1=Mass[0];

      }

   

   if (IntFromStr(Dev_Step_2,C, Mass)==1)

      {

        Stp2=Mass[1];

        Dev2=Mass[0];

      }      

   

   

   if (IntFromStr(Dev_Step_3,C, Mass)==1)

      {

        Stp3=Mass[1];

        Dev3=Mass[0];

      }      

   return(0); 

  } 

//+------------------------------------------------------------------+ 

//| Custor indicator deinitialization function                       | 

//+------------------------------------------------------------------+ 

int deinit() 

  { 

//---- 

    

//---- 

   return(0); 

  } 


//+------------------------------------------------------------------+ 

//| Custom indicator iteration function                              | 

//+------------------------------------------------------------------+ 

int start() 

  { 

  


//+--------- TRO MODIFICATION ---------------------------------------+   

   if( Bars != OldBars ) { Trigger1 = True ; Trigger2 = True ; Trigger3 = True ;}

   

     

   if (Period1>0) CountZZ(FP_BuferUp,FP_BuferDn,Period1,Dev1,Stp1);

   if (Period2>0) CountZZ(NP_BuferUp,NP_BuferDn,Period2,Dev2,Stp2);

   if (Period3>0) CountZZ(HP_BuferUp,HP_BuferDn,Period3,Dev3,Stp3);

   

   

//+--------- TRO MODIFICATION ---------------------------------------+  

      

    //  if ( Trigger1 &&  Sound.Alert ) 

      {

        if( FP_BuferUp[0] != 0 ) { Trigger1 = False ; Alert(symbol,"  ", tChartPeriod, " Level 1 Lower "+ DoubleToStr(Close[0] ,digits)); }

        if( FP_BuferDn[0] != 0 ) { Trigger1 = False ; Alert(symbol,"  ", tChartPeriod, " Level 1 Upper "+ DoubleToStr(Close[0] ,digits)); }

      }

      

      //if ( Trigger2 &&  Sound.Alert ) 

      {

        if( NP_BuferUp[0] != 0 ) { Trigger2 = False ; Alert(symbol,"  ", tChartPeriod, " Level 2 Lower "+ DoubleToStr(Close[0] ,digits)); }

        if( NP_BuferDn[0] != 0 ) { Trigger2 = False ; Alert(symbol,"  ", tChartPeriod, " Level 2 Upper "+ DoubleToStr(Close[0] ,digits)); }

      }

      

     // if ( Trigger3 &&  Sound.Alert ) 

      {     

        if( HP_BuferUp[0] != 0 ) { Trigger3 = False ; Alert(symbol,"  ", tChartPeriod, " Level 3 Lower "+ DoubleToStr(Close[0] ,digits)); }

        if( HP_BuferDn[0] != 0 ) { Trigger3 = False ; Alert(symbol,"  ", tChartPeriod, " Level 3 Upper "+ DoubleToStr(Close[0] ,digits)); }

      }


    

   OldBars = Bars ;   


//+--------- TRO MODIFICATION ---------------------------------------+                  

   return(0);

}


//+--------- TRO MODIFICATION ---------------------------------------+  


string TimeFrameToString(int tf)

{

   string tfs;

   switch(tf) {

      case PERIOD_M1:  tfs="M1"  ; break;

      case PERIOD_M5:  tfs="M5"  ; break;

      case PERIOD_M15: tfs="M15" ; break;

      case PERIOD_M30: tfs="M30" ; break;

      case PERIOD_H1:  tfs="H1"  ; break;

      case PERIOD_H4:  tfs="H4"  ; break;

      case PERIOD_D1:  tfs="D1"  ; break;

      case PERIOD_W1:  tfs="W1"  ; break;

      case PERIOD_MN1: tfs="MN";

   }

   return(tfs);

}


//+------------------------------------------------------------------+ 

// äîïîëíèòåëüíûå ôóíêöèè

//int Take




//+------------------------------------------------------------------+ 

//| Ôóíêö ôîðìèðîâàíèÿ ÇèãÇàãà                        | 

//+------------------------------------------------------------------+  

int CountZZ( double& ExtMapBuffer[], double& ExtMapBuffer2[], int ExtDepth, int ExtDeviation, int ExtBackstep )

  {

   int    shift, back,lasthighpos,lastlowpos;

   double val,res;

   double curlow,curhigh,lasthigh,lastlow;


   for(shift=Bars-ExtDepth; shift>=0; shift--)

     {

      val=Low[Lowest(NULL,0,MODE_LOW,ExtDepth,shift)];

      if(val==lastlow) val=0.0;

      else 

        { 

         lastlow=val; 

         if((Low[shift]-val)>(ExtDeviation*Point)) val=0.0;

         else

           {

            for(back=1; back<=ExtBackstep; back++)

              {

               res=ExtMapBuffer[shift+back];

               if((res!=0)&&(res>val)) ExtMapBuffer[shift+back]=0.0; 

              }

           }

        } 

        

          ExtMapBuffer[shift]=val;

      //--- high

      val=High[Highest(NULL,0,MODE_HIGH,ExtDepth,shift)];

      if(val==lasthigh) val=0.0;

      else 

        {

         lasthigh=val;

         if((val-High[shift])>(ExtDeviation*Point)) val=0.0;

         else

           {

            for(back=1; back<=ExtBackstep; back++)

              {

               res=ExtMapBuffer2[shift+back];

               if((res!=0)&&(res<val)) ExtMapBuffer2[shift+back]=0.0; 

              } 

           }

        }

      ExtMapBuffer2[shift]=val;

     }

   // final cutting 

   lasthigh=-1; lasthighpos=-1;

   lastlow=-1;  lastlowpos=-1;


   for(shift=Bars-ExtDepth; shift>=0; shift--)

     {

      curlow=ExtMapBuffer[shift];

      curhigh=ExtMapBuffer2[shift];

      if((curlow==0)&&(curhigh==0)) continue;

      //---

      if(curhigh!=0)

        {

         if(lasthigh>0) 

           {

            if(lasthigh<curhigh) ExtMapBuffer2[lasthighpos]=0;

            else ExtMapBuffer2[shift]=0;

           }

         //---

         if(lasthigh<curhigh || lasthigh<0)

           {

            lasthigh=curhigh;

            lasthighpos=shift;

           }

         lastlow=-1;

        }

      //----

      if(curlow!=0)

        {

         if(lastlow>0)

           {

            if(lastlow>curlow) ExtMapBuffer[lastlowpos]=0;

            else ExtMapBuffer[shift]=0;

           }

         //---

         if((curlow<lastlow)||(lastlow<0))

           {

            lastlow=curlow;

            lastlowpos=shift;

           } 

         lasthigh=-1;

        }

     }

  

   for(shift=Bars-1; shift>=0; shift--)

     {

      if(shift>=Bars-ExtDepth) ExtMapBuffer[shift]=0.0;

      else

        {

         res=ExtMapBuffer2[shift];

         if(res!=0.0) ExtMapBuffer2[shift]=res;

        }

     }

 }


//+------------------------------------------------------------------+   

int Str2Massive(string VStr, int& M_Count, int& VMass[])

  {

    int val=StrToInteger( VStr);

    if (val>0)

       {

         M_Count++;

         int mc=ArrayResize(VMass,M_Count);

         if (mc==0)return(-1);

          VMass[M_Count-1]=val;

         return(1);

       }

    else return(0);    

  } 

  


//+------------------------------------------------------------------+   

int IntFromStr(string ValStr,int& M_Count, int& VMass[])

  {

    

    if (StringLen(ValStr)==0) return(-1);

    string SS=ValStr;

    int NP=0; 

    string CS;

    M_Count=0;

    ArrayResize(VMass,M_Count);

    while (StringLen(SS)>0)

      {

            NP=StringFind(SS,",");

            if (NP>0)

               {

                 CS=StringSubstr(SS,0,NP);

                 SS=StringSubstr(SS,NP+1,StringLen(SS));  

               }

               else

               {

                 if (StringLen(SS)>0)

                    {

                      CS=SS;

                      SS="";

                    }

               }

            if (Str2Massive(CS,M_Count,VMass)==0) 

               {

                 return(-2);

               }

      }

    return(1);    

  }

  


//+------------------------------------------------------------------+   

파일:

응답함

1
개발자 1
등급
(162)
프로젝트
218
30%
중재
4
50% / 25%
기한 초과
5
2%
무료
게재됨: 1 코드
2
개발자 2
등급
(365)
프로젝트
465
23%
중재
50
60% / 20%
기한 초과
52
11%
바쁜
3
개발자 3
등급
(300)
프로젝트
336
71%
중재
6
50% / 33%
기한 초과
19
6%
로드됨
4
개발자 4
등급
(250)
프로젝트
332
70%
중재
12
42% / 25%
기한 초과
12
4%
작업중
게재됨: 18 코드
5
개발자 5
등급
(481)
프로젝트
560
38%
중재
2
100% / 0%
기한 초과
1
0%
무료
게재됨: 9 코드
6
개발자 6
등급
(320)
프로젝트
493
67%
중재
5
40% / 0%
기한 초과
4
1%
무료
게재됨: 8 코드
비슷한 주문
I'm looking for an experienced MQL5 developer to convert a fully functional Pine Script trading strategy into MQL5 for use on MetaTrader 5. The strategy is already backtested and includes entry/exit logic, stop loss, and take profit rules. ✅ Requirements: Strong experience with MQL5 and Pine Script Ability to accurately translate trading logic Clean, well-commented code Responsive communication and timely delivery If
I’m looking for a professional and experienced MQL4 developer who can accurately convert an already completed Pine Script (TradingView) code into a fully functional MT4 indicator or EA. The Pine Script is ready, and I need a clean, bug-free, and optimized MQL4 version that works exactly as intended. Please apply only if you are confident in handling Pine Script to MQL4 conversions. Share relevant past work if
hello great developer Hi I'm going from tradingview pinescript (the code is in the documents ) Need it converted to ninja trader 8. It's an Al brooks concept. Wanting it to print arrows above (for bullish) and below (for bearish) the candles that are "shaved" candles. The candle closes all the way at the top or bottom of the candle
Can you convert 2 think or swim indicators into one ninja trader strategy? There are two 1. kst indicators- the lines at the bottom so when the lines cross above (kst crossing above the signal line) we would buy and if it crosses below we would sell. 2. Reversal: green reversal buy and the red one we sell The ninja strategy Buy: green reversal or kst crossing above the signal line whichever comes first Sell: red
Hello, I need some help with my ninja script I have a pine script strategy I’m trying to convert to ninja script strategy. I done it but the profits are not matching and the reason I’m seeing is it’s difficult to set both a SL and Trailing Stop simultaneously and my strategy needs those
Hello, I am looking for a programmer who can convert from pine script to mql5. You will receive 11 different trading view indicators to convert to Mql5. You may find them simple and straightforward or not. However, you will add unified alert system to simplify things on mql5 and to alert whenever there is a buy or sell instance on the main chart for each indicator. Only 1 of the indicators may require some extra
There is an TradingView Indicator (We don't have PineScript), based on which we have created MQ5 indicator that works well with MT5. However, there are few other things which we couldn't able to figure out from the TradingView Indicator. So, we need someone to crack those things and implement with our existing MQ5 indicator. Once we replicate all functionalities from TradingView indicator to MQ5, we have a plan to
HELLO GREATE DEVEOPER I’m currently using two specific indicators on TradingView that I find very beneficial. However, I primarily trade using NinjaTrader and would like to adapt these indicators for that platform. Additionally, I have a few modifications in mind that I believe would enhance their functionality to suit my trading strategy better. the link is in the documents Here is the link to the first one: And
We are seeking a highly skilled MQL5 developer with experience in automated trading, API integration , and system deployment to help execute a production-ready trading system for the Indian stock market. The core requirement is to build a robust MetaTrader 5-based signal and automation system connected to Zerodha's Kite platform , using a proprietary crossover indicator
I’ve recently started using MetaTrader for the Indian market and I'm working with a custom indicator. I would like to generate buy and sell alerts based on crossover signals from this indicator. To do this, I’m looking for a developer who can help me create an API or a solution that can detect these crossovers and send alerts (via webhook, email, or any preferred method). If you have experience in creating such

프로젝트 정보

예산
30+ USD
개발자에게
27 USD