11 April 2019

Code KG Period



Pemanggilan code yang sama dan berulang akan lebih ringkas tidak menambah panjang code yang ditulis dalam MQl akan lebih efisien bila ditulis dalam satu fungsi fleksibel sehingga dapat dipanggil berulang kali tanpa menuliskannya lagi.
Dibawah ini salah satu fungsi tersebut.

Code ini biasanya saya diltakkan dibawah iteration function, atau bisa kita letakkan ditempat yang sekiranya tidak mengganggu kita sewaktu edit mql.
//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
int strRes=0,intRes=1,clrRes=2;
color  getClr(int enumPer,bool clrLight=true,color inpClr=clrNONE){
   return(inpClr==clrNONE||inpClr==2147483647?StringToColor(getPer(enumPer,2,clrLight)):inpClr);
}
string getPer(int enumPer,int modeRes,bool mClr=true){
//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
string strPer="";
int    mn=1,hr=60,dy=1440,wk=7200,mh=28800,yr=345600,intPer=0;
color clrPer=clrNONE;
   switch(enumPer){
      case  1: strPer= "1Hr";  intPer=   hr;   clrPer=mClr?C'255,000,000':C'150,000,000';  break;/*1 Hours*/
      case  2: strPer= "4Hr";  intPer= 4*hr;   clrPer=mClr?C'000,000,255':C'000,000,180';  break;/*4 Hours*/
      case  3: strPer= "6Hr";  intPer= 6*hr;   clrPer=mClr?C'180,180,000':C'140,140,000';  break;/*6 Hours*/
      case  4: strPer= "8Hr";  intPer= 8*hr;   clrPer=mClr?C'255,255,000':C'150,000,000';  break;/*8 Hours*/
      case  5: strPer="12Hr";  intPer=12*hr;   clrPer=mClr?C'000,160,000':C'000,140,000';  break;/*12 Hours*/
      case  6: strPer= "1Dy";  intPer=   dy;   clrPer=mClr?C'000,255,000':C'000,180,000';  break;/*1 Day*/
      case  7: strPer= "2Dy";  intPer= 2*dy;   clrPer=mClr?C'000,200,000':C'000,170,000';  break;/*2 Day*/
      case  8: strPer= "3Dy";  intPer= 3*dy;   clrPer=mClr?C'000,190,000':C'130,000,000';  break;/*3 Day*/
      case  9: strPer= "1Wk";  intPer=   wk;   clrPer=mClr?C'255,000,255':C'180,000,180';  break;/*1 Week*/
      case 10: strPer= "2Wk";  intPer= 2*wk;   clrPer=mClr?C'138,043,226':C'105,024,177';  break;/*2 Week*/
      case 11: strPer= "1Mh";  intPer=   mh;   clrPer=mClr?C'000,255,255':C'000,180,180';  break;/*1 Month*/
      case 12: strPer= "4Mh";  intPer= 4*mh;   clrPer=mClr?C'255,069,000':C'202,055,000';  break;/*4 Month*/
      case 13: strPer= "6Mh";  intPer= 6*mh;   clrPer=mClr?C'176,196,222':C'106,143,193';  break;/*6 Month*/
      case 14: strPer= "1Yr";  intPer=   yr;   clrPer=mClr?C'255,250,250':C'255,230,230';  break;/*1 Year*/
      case 95: switch(_Period){
                  case  PERIOD_M1 : strPer=    "";  intPer=NULL; clrPer=mClr?clrNONE:clrNONE;            break;/*Twice DownWard*/
                  case  PERIOD_M5 : strPer= "30M";  intPer=   30;   clrPer=mClr?C'128,128,000':C'074,074,000';  break;
                  case  PERIOD_M15: strPer= "1Hr";  intPer=   hr;   clrPer=mClr?C'255,000,000':C'150,000,000';  break;
                  case  PERIOD_M30: strPer= "4Hr";  intPer= 4*hr;   clrPer=mClr?C'000,000,255':C'000,000,180';  break;
                  case  PERIOD_H1 : strPer= "8Hr";  intPer= 8*hr;   clrPer=mClr?C'255,255,000':C'150,000,000';  break;
                  case  PERIOD_H4 : strPer= "1Dy";  intPer=   dy;   clrPer=mClr?C'000,255,000':C'000,180,000';  break;
                  case  PERIOD_D1 : strPer= "1Wk";  intPer=   wk;   clrPer=mClr?C'255,000,255':C'180,000,180';  break;
                  case  PERIOD_W1 : strPer= "1Mh";  intPer=   mh;   clrPer=mClr?C'000,255,255':C'000,180,180';  break;
                  case  PERIOD_MN1: strPer= "4Mh";  intPer= 4*mh;   clrPer=mClr?C'255,069,000':C'202,055,000';  break;
               } break;
      case 96: switch(_Period){
                  case  PERIOD_M1 : strPer= "30M";  intPer=   30;   clrPer=mClr?C'128,128,000':C'074,074,000';  break;/*Auto DownWard*/
                  case  PERIOD_M5 : strPer= "1Hr";  intPer=   hr;   clrPer=mClr?C'255,000,000':C'150,000,000';  break;
                  case  PERIOD_M15: strPer= "4Hr";  intPer= 4*hr;   clrPer=mClr?C'000,000,255':C'000,000,180';  break;
                  case  PERIOD_M30: strPer= "8Hr";  intPer= 8*hr;   clrPer=mClr?C'255,255,000':C'150,000,000';  break;
                  case  PERIOD_H1 : strPer= "1Dy";  intPer=   dy;   clrPer=mClr?C'000,255,000':C'000,180,000';  break;
                  case  PERIOD_H4 : strPer= "1Wk";  intPer=   wk;   clrPer=mClr?C'255,000,255':C'180,000,180';  break;
                  case  PERIOD_D1 : strPer= "1Mh";  intPer=   mh;   clrPer=mClr?C'000,255,255':C'000,180,180';  break;
                  case  PERIOD_W1 : strPer= "4Mh";  intPer= 4*mh;   clrPer=mClr?C'255,069,000':C'202,055,000';  break;
                  case  PERIOD_MN1: strPer= "1Yr";  intPer=   yr;   clrPer=mClr?C'255,250,250':C'255,230,230';  break;
               } break;
      case 97: switch(_Period){
                  case  PERIOD_M1 : strPer= "1Hr";  intPer=   hr;   clrPer=mClr?C'255,000,000':C'150,000,000';  break;/*Auto Period*/
                  case  PERIOD_M5 : strPer= "4Hr";  intPer= 4*hr;   clrPer=mClr?C'000,000,255':C'000,000,180';  break;
                  case  PERIOD_M15: strPer= "8Hr";  intPer= 8*hr;   clrPer=mClr?C'255,255,000':C'150,000,000';  break;
                  case  PERIOD_M30: strPer= "1Dy";  intPer=   dy;   clrPer=mClr?C'000,255,000':C'000,180,000';  break;
                  case  PERIOD_H1 : strPer= "1Wk";  intPer=   wk;   clrPer=mClr?C'255,000,255':C'180,000,180';  break;
                  case  PERIOD_H4 : strPer= "1Mh";  intPer=   mh;   clrPer=mClr?C'000,255,255':C'000,180,180';  break;
                  case  PERIOD_D1 : strPer= "4Mh";  intPer= 4*mh;   clrPer=mClr?C'255,069,000':C'202,055,000';  break;
                  case  PERIOD_W1 : strPer= "1Yr";  intPer=   yr;   clrPer=mClr?C'255,250,250':C'255,230,230';  break;
                  case  PERIOD_MN1: strPer= "4Yr";  intPer= 4*yr;   clrPer=mClr?C'210,180,180':C'187,142,083';  break;
               } break;
      case 98: switch(_Period){
                  case  PERIOD_M1 : strPer= "4Hr";  intPer= 4*hr;   clrPer=mClr?C'000,000,255':C'000,000,180';  break;/*Auto UpWard*/
                  case  PERIOD_M5 : strPer= "8Hr";  intPer= 8*hr;   clrPer=mClr?C'255,255,000':C'150,000,000';  break;
                  case  PERIOD_M15: strPer= "1Dy";  intPer=   dy;   clrPer=mClr?C'000,255,000':C'000,180,000';  break;
                  case  PERIOD_M30: strPer= "1Wk";  intPer=   wk;   clrPer=mClr?C'255,000,255':C'180,000,180';  break;
                  case  PERIOD_H1 : strPer= "1Mh";  intPer=   mh;   clrPer=mClr?C'000,255,255':C'000,180,180';  break;
                  case  PERIOD_H4 : strPer= "4Mh";  intPer= 4*mh;   clrPer=mClr?C'255,069,000':C'202,055,000';  break;
                  case  PERIOD_D1 : strPer= "1Yr";  intPer=   yr;   clrPer=mClr?C'255,250,250':C'255,230,230';  break;
                  case  PERIOD_W1 : strPer= "1Yr";  intPer=   yr;   clrPer=mClr?C'255,250,250':C'255,230,230';  break;
                  case  PERIOD_MN1: strPer= "6Yr";  intPer= 6*yr;   clrPer=mClr?C'244,164,096':C'221,104,015';  break;
               } break;
      case 99: switch(_Period){
                  case  PERIOD_M1 : strPer= "8Hr";  intPer= 8*hr;   clrPer=mClr?C'255,255,000':C'150,000,000';  break;/*Twice UpWard*/
                  case  PERIOD_M5 : strPer= "1Dy";  intPer=   dy;   clrPer=mClr?C'000,255,000':C'000,180,000';  break;
                  case  PERIOD_M15: strPer= "1Wk";  intPer=   wk;   clrPer=mClr?C'255,000,255':C'180,000,180';  break;
                  case  PERIOD_M30: strPer= "1Mh";  intPer=   mh;   clrPer=mClr?C'000,255,255':C'000,180,180';  break;
                  case  PERIOD_H1 : strPer= "4Mh";  intPer= 4*mh;   clrPer=mClr?C'255,069,000':C'202,055,000';  break;
                  case  PERIOD_H4 : strPer= "1Yr";  intPer=   yr;   clrPer=mClr?C'255,250,250':C'255,230,230';  break;
                  case  PERIOD_D1 : strPer= "1Yr";  intPer=   yr;   clrPer=mClr?C'255,250,250':C'255,230,230';  break;
                  case  PERIOD_W1 : strPer= "6Yr";  intPer= 6*yr;   clrPer=mClr?C'244,164,096':C'221,104,015';  break;
                  case  PERIOD_MN1: strPer=    "";  intPer=NULL; clrPer=mClr?clrNONE:clrNONE;            break;
               } break;     
   }
   switch(modeRes){
      case  1: return(IntegerToString((int)MathCeil(intPer/_Period))); break;
      case  2: return(ColorToString(clrPer)); break;
      default: return(strPer);
   }
}

Untuk pemanggilan fungsi string periode
getPer(mPer1,strRes)

Untuk pemanggilan fungsi integer periode harus kita rubah dari string ke integer seperti berikut
StrToInteger(getPer(mPer1,intRes))

Untuk pemanggilan fungsi warna periode sudah kita rubah dari string ke color jadi tidak usah convert lagi
untuk warna cerah
getClr(mPer1,true)

untuk warna gelap
getClr(mPer1,false)

untuk warna custom jika diberikan input warna di parameter input 
getClr(mPer1,false,id_warna_pada_parameter_input)

Code pemilihan periode pada parameter input ( sebelum fungsi int OnInit() )
enum  ePer1   {P195=95/*Auto Twice Down Ward*/,P196=96/*Auto Down Ward*/,
                P197=97/*Auto Period*/,P198=98/*Auto Up Ward*/,P199=99/*Auto Twice Up Ward*/,
                P101=1/*1 Hours*/,P102/*4 Hours*/,P103/*6 Hours*/,P104/*8 Hours*/,P105/*12 Hours*/,
                P106/*1 Day*/,P107/*2 Day*/,P108/*3 Day*/,P109/*1 Week*/,P110/*2 Week*/,
                P111/*1 Month*/,P112/*4 Month*/,P113/*6 Month*/,P114/*1 Year*/};

input ePer1       mPer1    = 96;//Select Periode

Bentuk jadinya seperti berikut
//+------------------------------------------------------------------+
//|                                                        dMACD.mq4 |
//|                        Copyright 2019, MetaQuotes Software Corp. |
//|                                             https://www.mql5.com |
//+------------------------------------------------------------------+
#property copyright "Copyright 2019, MetaQuotes Software Corp."
#property link      "https://www.mql5.com"
#property version   "1.00"
#property strict
#property indicator_separate_window

#define statName "dMACD"

enum  ePer1   {P195=95/*Auto Twice Down Ward*/,P196=96/*Auto Down Ward*/,
                P197=97/*Auto Period*/,P198=98/*Auto Up Ward*/,P199=99/*Auto Twice Up Ward*/,
                P101=1/*1 Hours*/,P102/*4 Hours*/,P103/*6 Hours*/,P104/*8 Hours*/,P105/*12 Hours*/,
                P106/*1 Day*/,P107/*2 Day*/,P108/*3 Day*/,P109/*1 Week*/,P110/*2 Week*/,
                P111/*1 Month*/,P112/*4 Month*/,P113/*6 Month*/,P114/*1 Year*/};

input ePer1    mPer1    = 96;//Select Periode
input color    clrPer1  = clrNONE;//Input Color

string iName;
//+------------------------------------------------------------------+
//| Custom indicator initialization function                         |
//+------------------------------------------------------------------+
int OnInit(){
   iName = statName;
   
   return(INIT_SUCCEEDED);
}
//+==================================================================+
//| Custom indicator deinitialization function                       |
//+==================================================================+
void OnDeinit(const int reason){
   int obj_total=ObjectsTotal();
 for(int i=obj_total; i>=0; i--){
  string name = ObjectName(i);
  if(StringFind(name,iName,0)!= -1)
     ObjectDelete(name);
 }
}
//+------------------------------------------------------------------+
//| Custom indicator iteration function                              |
//+------------------------------------------------------------------+
int OnCalculate(const int rates_total,
                const int prev_calculated,
                const datetime &time[],
                const double &open[],
                const double &high[],
                const double &low[],
                const double &close[],
                const long &tick_volume[],
                const long &volume[],
                const int &spread[]){
   Comment("\n\n\n\n\n\n",
          "Periode : ",getPer(mPer1,strRes),"\n",
          "        : [",StrToInteger(getPer(mPer1,intRes)),"]\n",
          "        :  ",getClr(mPer1),"  -  ",getClr(mPer1,false),"  -  ",getClr(mPer1,false,clrPer1));
   return(rates_total);
}

//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
int strRes=0,intRes=1,clrRes=2;
color  getClr(int enumPer,bool clrLight=true,color inpClr=clrNONE){
   return(inpClr==clrNONE||inpClr==2147483647?StringToColor(getPer(enumPer,2,clrLight)):inpClr);
}
string getPer(int enumPer,int modeRes,bool mClr=true){
//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
string strPer="";
int    mn=1,hr=60,dy=1440,wk=7200,mh=28800,yr=345600,intPer=0;
color clrPer=clrNONE;
   switch(enumPer){
      case  1: strPer= "1Hr";  intPer=   hr;   clrPer=mClr?C'255,000,000':C'150,000,000';  break;/*1 Hours*/
      case  2: strPer= "4Hr";  intPer= 4*hr;   clrPer=mClr?C'000,000,255':C'000,000,180';  break;/*4 Hours*/
      case  3: strPer= "6Hr";  intPer= 6*hr;   clrPer=mClr?C'180,180,000':C'140,140,000';  break;/*6 Hours*/
      case  4: strPer= "8Hr";  intPer= 8*hr;   clrPer=mClr?C'255,255,000':C'150,000,000';  break;/*8 Hours*/
      case  5: strPer="12Hr";  intPer=12*hr;   clrPer=mClr?C'000,160,000':C'000,140,000';  break;/*12 Hours*/
      case  6: strPer= "1Dy";  intPer=   dy;   clrPer=mClr?C'000,255,000':C'000,180,000';  break;/*1 Day*/
      case  7: strPer= "2Dy";  intPer= 2*dy;   clrPer=mClr?C'000,200,000':C'000,170,000';  break;/*2 Day*/
      case  8: strPer= "3Dy";  intPer= 3*dy;   clrPer=mClr?C'000,190,000':C'130,000,000';  break;/*3 Day*/
      case  9: strPer= "1Wk";  intPer=   wk;   clrPer=mClr?C'255,000,255':C'180,000,180';  break;/*1 Week*/
      case 10: strPer= "2Wk";  intPer= 2*wk;   clrPer=mClr?C'138,043,226':C'105,024,177';  break;/*2 Week*/
      case 11: strPer= "1Mh";  intPer=   mh;   clrPer=mClr?C'000,255,255':C'000,180,180';  break;/*1 Month*/
      case 12: strPer= "4Mh";  intPer= 4*mh;   clrPer=mClr?C'255,069,000':C'202,055,000';  break;/*4 Month*/
      case 13: strPer= "6Mh";  intPer= 6*mh;   clrPer=mClr?C'176,196,222':C'106,143,193';  break;/*6 Month*/
      case 14: strPer= "1Yr";  intPer=   yr;   clrPer=mClr?C'255,250,250':C'255,230,230';  break;/*1 Year*/
      case 95: switch(_Period){
                  case  PERIOD_M1 : strPer=    "";  intPer=NULL; clrPer=mClr?clrNONE:clrNONE;            break;/*Twice DownWard*/
                  case  PERIOD_M5 : strPer= "30M";  intPer=   30;   clrPer=mClr?C'128,128,000':C'074,074,000';  break;
                  case  PERIOD_M15: strPer= "1Hr";  intPer=   hr;   clrPer=mClr?C'255,000,000':C'150,000,000';  break;
                  case  PERIOD_M30: strPer= "4Hr";  intPer= 4*hr;   clrPer=mClr?C'000,000,255':C'000,000,180';  break;
                  case  PERIOD_H1 : strPer= "8Hr";  intPer= 8*hr;   clrPer=mClr?C'255,255,000':C'150,000,000';  break;
                  case  PERIOD_H4 : strPer= "1Dy";  intPer=   dy;   clrPer=mClr?C'000,255,000':C'000,180,000';  break;
                  case  PERIOD_D1 : strPer= "1Wk";  intPer=   wk;   clrPer=mClr?C'255,000,255':C'180,000,180';  break;
                  case  PERIOD_W1 : strPer= "1Mh";  intPer=   mh;   clrPer=mClr?C'000,255,255':C'000,180,180';  break;
                  case  PERIOD_MN1: strPer= "4Mh";  intPer= 4*mh;   clrPer=mClr?C'255,069,000':C'202,055,000';  break;
               } break;
      case 96: switch(_Period){
                  case  PERIOD_M1 : strPer= "30M";  intPer=   30;   clrPer=mClr?C'128,128,000':C'074,074,000';  break;/*Auto DownWard*/
                  case  PERIOD_M5 : strPer= "1Hr";  intPer=   hr;   clrPer=mClr?C'255,000,000':C'150,000,000';  break;
                  case  PERIOD_M15: strPer= "4Hr";  intPer= 4*hr;   clrPer=mClr?C'000,000,255':C'000,000,180';  break;
                  case  PERIOD_M30: strPer= "8Hr";  intPer= 8*hr;   clrPer=mClr?C'255,255,000':C'150,000,000';  break;
                  case  PERIOD_H1 : strPer= "1Dy";  intPer=   dy;   clrPer=mClr?C'000,255,000':C'000,180,000';  break;
                  case  PERIOD_H4 : strPer= "1Wk";  intPer=   wk;   clrPer=mClr?C'255,000,255':C'180,000,180';  break;
                  case  PERIOD_D1 : strPer= "1Mh";  intPer=   mh;   clrPer=mClr?C'000,255,255':C'000,180,180';  break;
                  case  PERIOD_W1 : strPer= "4Mh";  intPer= 4*mh;   clrPer=mClr?C'255,069,000':C'202,055,000';  break;
                  case  PERIOD_MN1: strPer= "1Yr";  intPer=   yr;   clrPer=mClr?C'255,250,250':C'255,230,230';  break;
               } break;
      case 97: switch(_Period){
                  case  PERIOD_M1 : strPer= "1Hr";  intPer=   hr;   clrPer=mClr?C'255,000,000':C'150,000,000';  break;/*Auto Period*/
                  case  PERIOD_M5 : strPer= "4Hr";  intPer= 4*hr;   clrPer=mClr?C'000,000,255':C'000,000,180';  break;
                  case  PERIOD_M15: strPer= "8Hr";  intPer= 8*hr;   clrPer=mClr?C'255,255,000':C'150,000,000';  break;
                  case  PERIOD_M30: strPer= "1Dy";  intPer=   dy;   clrPer=mClr?C'000,255,000':C'000,180,000';  break;
                  case  PERIOD_H1 : strPer= "1Wk";  intPer=   wk;   clrPer=mClr?C'255,000,255':C'180,000,180';  break;
                  case  PERIOD_H4 : strPer= "1Mh";  intPer=   mh;   clrPer=mClr?C'000,255,255':C'000,180,180';  break;
                  case  PERIOD_D1 : strPer= "4Mh";  intPer= 4*mh;   clrPer=mClr?C'255,069,000':C'202,055,000';  break;
                  case  PERIOD_W1 : strPer= "1Yr";  intPer=   yr;   clrPer=mClr?C'255,250,250':C'255,230,230';  break;
                  case  PERIOD_MN1: strPer= "4Yr";  intPer= 4*yr;   clrPer=mClr?C'210,180,180':C'187,142,083';  break;
               } break;
      case 98: switch(_Period){
                  case  PERIOD_M1 : strPer= "4Hr";  intPer= 4*hr;   clrPer=mClr?C'000,000,255':C'000,000,180';  break;/*Auto UpWard*/
                  case  PERIOD_M5 : strPer= "8Hr";  intPer= 8*hr;   clrPer=mClr?C'255,255,000':C'150,000,000';  break;
                  case  PERIOD_M15: strPer= "1Dy";  intPer=   dy;   clrPer=mClr?C'000,255,000':C'000,180,000';  break;
                  case  PERIOD_M30: strPer= "1Wk";  intPer=   wk;   clrPer=mClr?C'255,000,255':C'180,000,180';  break;
                  case  PERIOD_H1 : strPer= "1Mh";  intPer=   mh;   clrPer=mClr?C'000,255,255':C'000,180,180';  break;
                  case  PERIOD_H4 : strPer= "4Mh";  intPer= 4*mh;   clrPer=mClr?C'255,069,000':C'202,055,000';  break;
                  case  PERIOD_D1 : strPer= "1Yr";  intPer=   yr;   clrPer=mClr?C'255,250,250':C'255,230,230';  break;
                  case  PERIOD_W1 : strPer= "1Yr";  intPer=   yr;   clrPer=mClr?C'255,250,250':C'255,230,230';  break;
                  case  PERIOD_MN1: strPer= "6Yr";  intPer= 6*yr;   clrPer=mClr?C'244,164,096':C'221,104,015';  break;
               } break;
      case 99: switch(_Period){
                  case  PERIOD_M1 : strPer= "8Hr";  intPer= 8*hr;   clrPer=mClr?C'255,255,000':C'150,000,000';  break;/*Twice UpWard*/
                  case  PERIOD_M5 : strPer= "1Dy";  intPer=   dy;   clrPer=mClr?C'000,255,000':C'000,180,000';  break;
                  case  PERIOD_M15: strPer= "1Wk";  intPer=   wk;   clrPer=mClr?C'255,000,255':C'180,000,180';  break;
                  case  PERIOD_M30: strPer= "1Mh";  intPer=   mh;   clrPer=mClr?C'000,255,255':C'000,180,180';  break;
                  case  PERIOD_H1 : strPer= "4Mh";  intPer= 4*mh;   clrPer=mClr?C'255,069,000':C'202,055,000';  break;
                  case  PERIOD_H4 : strPer= "1Yr";  intPer=   yr;   clrPer=mClr?C'255,250,250':C'255,230,230';  break;
                  case  PERIOD_D1 : strPer= "1Yr";  intPer=   yr;   clrPer=mClr?C'255,250,250':C'255,230,230';  break;
                  case  PERIOD_W1 : strPer= "6Yr";  intPer= 6*yr;   clrPer=mClr?C'244,164,096':C'221,104,015';  break;
                  case  PERIOD_MN1: strPer=    "";  intPer=NULL; clrPer=mClr?clrNONE:clrNONE;            break;
               } break;     
   }
   switch(modeRes){
      case  1: return(IntegerToString((int)MathCeil(intPer/_Period))); break;
      case  2: return(ColorToString(clrPer)); break;
      default: return(strPer);
   }
}

0 komentar:

Posting Komentar