English

## Forex Goile GMT

 5 Simmon4569 2016.06.08 21:41 #   Simmon4569: Thanks for Offer !!I am trying to do calculations as it was in indicator . And post it what ever i obtain.Hey i tried the following calculation in the script but does not give me the same result .Hope so that u will understand the problem causing different result or guide me if something is missing and to be included .```#property copyright "Copyright 2016, MetaQuotes Software Corp." #property link      "https://www.mql5.com" #property version   "1.00" #property strict //Price_Angle = MathMod(((MathSqrt(ny_close[shift])*180) -225), 360);   *****the formulae as used in the indicator //double MathS_OP = MathSqrt(ny_close[shift]);                          *****the formulae as used in the indicator void OnStart() { Angle_value(); GMT = GMT/10000;    // i use Gmt as it was having the same value of ny_close if(price_angle >= 0  &&  price_angle <= 90 )                  // following are calculation as it was in the indicator with different names { twhite =  GMT/10000  ; torange=  ((Math_OP - (Factor_NO/2)) * (Math_OP - (Factor_NO/2)))/10000; tlime =  ((Math_OP + (Factor_NO/2)) * (Math_OP + (Factor_NO/2)))/10000; tblue=  ((Math_OP + (Factor_NO)  ) * (Math_OP + Factor_NO ))/10000 ; tred  =  ((Math_OP - Factor_NO)  * (Math_OP  - Factor_NO))/10000; } if(price_angle >= 180 && price_angle  <= 270 ) { twhite =  GMT/10000  ; torange=  ((Math_OP - (Factor_NO/2)) * (Math_OP - (Factor_NO/2)))/10000; tlime =  ((Math_OP + (Factor_NO/2)) * (Math_OP + (Factor_NO/2)))/10000; tblue=  ((Math_OP + (Factor_NO)  ) * (Math_OP + Factor_NO ))/10000 ; tred  =  ((Math_OP - Factor_NO)  * (Math_OP  - Factor_NO))/10000; } if(price_angle >= 91 && price_angle < 180 ) { twhite1 =   GMT/10000  ; torange1 =  ((Math_OP + (Factor_NO/2)) * (Math_OP + (Factor_NO/2)))/10000; tlime1   =  ((Math_OP - (Factor_NO/2)) * (Math_OP - (Factor_NO/2)))/10000; tblue1   =  ((Math_OP - (Factor_NO)  ) * (Math_OP - Factor_NO ))/10000 ; tred1    =  ((Math_OP +  Factor_NO)    * (Math_OP + Factor_NO))/10000; } if(price_angle >= 271 && price_angle <= 360 ) { twhite1 =   GMT/10000  ; torange1 =  ((Math_OP + (Factor_NO/2)) * (Math_OP + (Factor_NO/2)))/10000; tlime1   =  ((Math_OP - (Factor_NO/2)) * (Math_OP - (Factor_NO/2)))/10000; tblue1   =  ((Math_OP - (Factor_NO)  ) * (Math_OP - Factor_NO ))/10000 ; tred1    =  ((Math_OP +  Factor_NO)    * (Math_OP + Factor_NO))/10000; } Alert("value of white " , NormalizeDouble(twhite,5 ));                         // alert for white line   Alert("value of orange " ,NormalizeDouble(torange,5) );                        // alert for orange line Alert("value of lime " , NormalizeDouble(tlime,5) );                           // alert for lime line Alert("value of blue " , NormalizeDouble(tblue,5) );                           // alert for blue line Alert("value of tred " ,NormalizeDouble(tred,5) );                             // alert for red line Alert("FACTOR_NO ++ == +++ === " , Factor_NO); Alert("value of white1 " , NormalizeDouble(twhite1,5 )); Alert("value of orange1 " ,NormalizeDouble(torange1,5) ); Alert("value of lime1 " , NormalizeDouble(tlime1,5) ); Alert("value of blue1 " , NormalizeDouble(tblue1,5) ); Alert("value of tred1 " ,NormalizeDouble(tred,5) );    } double GMT = iCustom(NULL,0,"Forex-goile-mod-gmt",100,1,4,false,1,0,4,0,1);              // getting the value of ny_close double price_angle = (MathMod((MathSqrt(GMT*180)-225),360));                             // calculating the price of price_angle as it was in the indi double Math_OP = MathSqrt(GMT);                                                          // calculating the value for Math_OP double twhite   ; double tlime    ; double tblue    ; double torange  ; double tred     ; double twhite1  ; double tlime1   ; double tblue1   ; double torange1 ; double tred1    ; double Correction_V  = 0 ; double Correction_V1 = 0 ; double Correction_V2 = 0 ; double Corrected_Price_angle  = 0 ; double Corrected_Price_angle1 = 0 ; double Corrected_Price_angle2 = 0 ; double Factor_NO  = 0 ;   double Factor_NO1 = 0 ; double Factor_NO2 = 0 ; void Angle_value()                                          // getting the value of factor in the user definr function {   if(price_angle >= 90)   {    Correction_V1 = NormalizeDouble((price_angle/90),0);    Corrected_Price_angle1 = (price_angle/Correction_V1);    Factor_NO1 = Corrected_Price_angle1/180 ;       Correction_V  = Correction_V1 ;    Corrected_Price_angle = Corrected_Price_angle1 ;    Factor_NO = Factor_NO1 ;   } else   {    Correction_V2 = NormalizeDouble((90/price_angle),0);    Corrected_Price_angle2 = (price_angle * Correction_V2);    Factor_NO2 = Corrected_Price_angle2/180 ;       Correction_V = Correction_V2 ;    Corrected_Price_angle = Corrected_Price_angle2 ;    Factor_NO = Factor_NO2 ;   } }   ```