صفحة 560 من 686 الأولىالأولى ... 60460510550554555556557558559560561562563564565566570610660 ... الأخيرةالأخيرة
النتائج 8,386 إلى 8,400 من 10283
  1. #8386
    الصورة الرمزية abo_samar
    abo_samar غير متواجد حالياً عضو المتداول العربي
    تاريخ التسجيل
    Apr 2012
    المشاركات
    62

    افتراضي

    السلام عليكم ورحمة الله وبركاته
    كيف نحول التاريخ الى رقم
    بدل تاريخ 2017/01/01
    يصبح رقم 20170101
    حيث رقم اليوم و الشهر اذا كان اقل من 10 يكتب صفر قبل الرقم مثل 1 يكون 01 و 9 يكون 09
    وما فوق 9 كما هو مثل 10 او 11 او 12
    وكيف نحوله مره اخرى من رقم الى تاريخ
    مثل 20170921 يتحول الى تاريخ 2017/09/21
    آخر تعديل بواسطة abo_samar ، 03-08-2017 الساعة 01:10 PM

  2. #8387
    الصورة الرمزية MR.dollar
    MR.dollar غير متواجد حالياً مشرف المتداول العربي
    تاريخ التسجيل
    Jun 2009
    الإقامة
    مصر
    المشاركات
    13,851

    افتراضي

    اقتباس المشاركة الأصلية كتبت بواسطة abo_samar مشاهدة المشاركة
    السلام عليكم ورحمة الله وبركاته
    كيف نحول التاريخ الى رقم
    بدل تاريخ 2017/01/01
    يصبح رقم 20170101
    حيث رقم اليوم و الشهر اذا كان اقل من 10 يكتب صفر قبل الرقم مثل 1 يكون 01 و 9 يكون 09
    وما فوق 9 كما هو مثل 10 او 11 او 12
    وكيف نحوله مره اخرى من رقم الى تاريخ
    مثل 20170921 يتحول الى تاريخ 2017/09/21
    وعليكم السلام ورحمة الله وبركاته
    يمكنك إستخدام الداله TimeToString لتحويل التوقيت إلى تاريخ
    مثال
    كود PHP:
    string date=TimeToString(Time[0],TIME_DATE); 
    ثم لحذف الفواصل بين التاريخ يمكنك إستخدام الداله StringReplace
    مثال
    كود PHP:
    StringReplace(date,".",""); 
    توقيع العضو
    بناء أنظمة تداول آلي ويدوي لفحص سوق العملات ودمجها مع التحليل الفني لإتخاذ القرارات

  3. #8388
    الصورة الرمزية salamandal
    salamandal غير متواجد حالياً عضو المتداول العربي
    تاريخ التسجيل
    May 2016
    الإقامة
    الجزائر
    المشاركات
    191

    افتراضي

    السلام عليكم ورحمة الله وبركاته
    ليست لدي خبرة في البرمجة بلغة MQL4 ولكنني أحاول تعلم هذه اللغة بقدر المستطاع
    سؤالي هو : إذا كان لدينا عدد من الصفقات المفتوحة (شراء وبيع) و بلوتات مختلفة
    ماهي الدالة التي أعرف بها اللوت المستخدم في آخر صفقة شراء ؟
    و ماهي الدالة التي أعرف بها اللوت المستخدم في آخر صفقة بيع؟
    مع شكري لجميع القائمين على المنتدى و أعضائه

  4. #8389
    الصورة الرمزية MR.dollar
    MR.dollar غير متواجد حالياً مشرف المتداول العربي
    تاريخ التسجيل
    Jun 2009
    الإقامة
    مصر
    المشاركات
    13,851

    افتراضي

    اقتباس المشاركة الأصلية كتبت بواسطة salamandal مشاهدة المشاركة
    السلام عليكم ورحمة الله وبركاته
    ليست لدي خبرة في البرمجة بلغة MQL4 ولكنني أحاول تعلم هذه اللغة بقدر المستطاع
    سؤالي هو : إذا كان لدينا عدد من الصفقات المفتوحة (شراء وبيع) و بلوتات مختلفة
    ماهي الدالة التي أعرف بها اللوت المستخدم في آخر صفقة شراء ؟
    و ماهي الدالة التي أعرف بها اللوت المستخدم في آخر صفقة بيع؟
    مع شكري لجميع القائمين على المنتدى و أعضائه
    وعليكم السلام ورحمة الله وبركاته
    هذا مثال
    كود PHP:
    double LastOrderLot(int type)
      {
       for(
    int i=OrdersTotal()-1;i>=0;i--)
         {
          
    bool select=OrderSelect(i,SELECT_BY_POS,MODE_TRADES);
          if(
    OrderSymbol()==Symbol() && OrderMagicNumber()==MagicNumber && OrderType()==type )
            {
              return(
    OrderLots());
            }
         }
       return(
    0);
      } 
    توقيع العضو
    بناء أنظمة تداول آلي ويدوي لفحص سوق العملات ودمجها مع التحليل الفني لإتخاذ القرارات

  5. #8390
    الصورة الرمزية salamandal
    salamandal غير متواجد حالياً عضو المتداول العربي
    تاريخ التسجيل
    May 2016
    الإقامة
    الجزائر
    المشاركات
    191

    افتراضي

    بارك الله فيك أستاذ أسامة وزادك علما

  6. #8391
    الصورة الرمزية zied78
    zied78 غير متواجد حالياً عضو المتداول العربي
    تاريخ التسجيل
    Jul 2017
    الإقامة
    تونس
    المشاركات
    33

    افتراضي تعديل على المتغيرات الخارجية

    السلام عليكم اساتذتنا الكرام اريد معرفة كيفية التعديل على المتغير الخارجي ليضهر ايضا في خانة تغيير الالوان كهذا المثال لمؤشر fibo independance وايضا كيفية اضافتها في المؤشرات اللتى لا تحتوي على متغيرات خارجية كمؤشر multi pivots و شكرا اخواني .

    اضغط على الصورة لعرض أكبر

الاســـم:	fibo independance edit.jpg
المشاهدات:	45
الحجـــم:	155.3 كيلوبايت
الرقم:	470391
    اضغط على الصورة لعرض أكبر

الاســـم:	Multi pivots edit.jpg
المشاهدات:	41
الحجـــم:	155.7 كيلوبايت
الرقم:	470392

    fibo independance

    كود PHP:
    //+------------------------------------------------------------------+
    //|                                            Fibo_Independence.mq4 |
    //|                                         Copyright © 2012, bdeyes |
    //|                                              [email protected] |
    //+------------------------------------------------------------------+
    #property copyright "Copyright © 2012, bdeyes"
    #property link      "[email protected]"
    #property indicator_chart_window


    /*
    To use:

    Place indicator on your chart.

    Setting "TrendName" to unique value will allow the
    running of multiple copies of the indicator.
    (this allows you to use multiple fibs at the same time to look 
    for areas of confluence) 

    Draw a trendline where you want the fibonacci levels calculated
    (same as you would to use the MT4 fib retracement tool). Open the 
    trendline properties box and name the trendline the same as the name 
    at TrendName - i.e. "Fib1".

    Fib levels will calculate on next tick or you can refresh your chart.

    To make changes open the indicator properties box and make adjustments

    You can choose which levels to display, what color the lines are, what width
    the lines are, and what style the lines are all without redrawing the fib.

    To make any of the settings the "default" make changes in MetaEditor and then
    compile the indicator again.

    To make multiple settings for multiple TrendNames, make your settings 
    and then save everything as a template.


    */

    // -------- External Variables --------------------------------------+

    extern string TrendName="Fib1"// Unique name of trend line to place fib on.

    extern string Note1="Set \"true\" to show line";
    extern bool Fibo_0_Show=true;
    extern bool Fibo_100_Show true;
    extern bool Fibo_236_Show false;
    extern bool Fibo_382_Show true;
    extern bool Fibo_500_Show false;
    extern bool Fibo_618_Show true;
    extern bool Fibo_707_Show false;
    extern bool Fibo_786_Show true;
    extern bool Fibo_886_Show true;

    extern string Note2="Select line colors";
    extern color Fibo_0_Color   DimGray;
    extern color Fibo_236_Color Khaki;
    extern color Fibo_382_Color Red;
    extern color Fibo_500_Color FireBrick;
    extern color Fibo_618_Color Blue;
    extern color Fibo_707_Color Magenta;
    extern color Fibo_786_Color DarkViolet;
    extern color Fibo_886_Color Green;
    extern color Fibo_100_Color DimGray;

    extern string Note3 "Select line width";
    extern string Note4 "setting 0 - 4";
    extern int Fibo_0_Width   0;
    extern int Fibo_236_Width 0;
    extern int Fibo_382_Width 1;
    extern int Fibo_500_Width 0;
    extern int Fibo_618_Width 1;
    extern int Fibo_707_Width 0;
    extern int Fibo_786_Width 0;
    extern int Fibo_886_Width 0;
    extern int Fibo_100_Width 0;

    extern string Note5 "Select line style";
    extern string Note6 "setting 0 = solid";
    extern string Note7 "setting 1 = dash";
    extern string Note8 "setting 2 = dot";
    extern string Note9 "setting 3 = dashdot";
    extern string Note10 "setting 4 = dashdotdot";
    extern string Note11 "Only works with";
    extern string Note12 "line width > 2";
    extern int Fibo_0_Style   1;
    extern int Fibo_236_Style 1;
    extern int Fibo_382_Style 0;
    extern int Fibo_500_Style 1;
    extern int Fibo_618_Style 0;
    extern int Fibo_707_Style 1;
    extern int Fibo_786_Style 0;
    extern int Fibo_886_Style 0;
    extern int Fibo_100_Style 1;

    extern int TextSize=10// text size for price & fib number
    extern string TextFont="Arial"//text to use for display font
    extern string Note0="To extend line beyond of price";
    extern int BarsAhead=12// Number of bars ahead of current price to show line & text
    int TextBarsAhead=0;
    int textadd=5// move text off end of line this many bars
    //+------------------------------------------------------------------+
    //| Custom indicator initialization function                         |
    //+------------------------------------------------------------------+
    int init()
      {
    //---- indicator short name
       
    IndicatorShortName("Fibo_Independence"+TrendName);
    //---- initialization done
       
    return(0);
      }
    //+------------------------------------------------------------------+
    //| Custom indicator deinitialization function                       |
    //+------------------------------------------------------------------+
    int deinit()
      {
       
    ClearChart();

       return(
    0);
      }
    //+------------------------------------------------------------------+
    //| Custom indicator iteration function                              |
    //+------------------------------------------------------------------+
    int start()
      {
    //+---------------------+
    //| Fibo lines function |
    //+---------------------+
       
    double FIBO100,FIBO0,Q,FIBO236,FIBO382,FIBO50,FIBO618,FIBO707,FIBO786,FIBO886;
       
    double WaveStart,WaveEnd;
       
    double price1=0,price2=0;
       
    datetime T1,T2;
       
    int HighBarsBack0;
       
    int LowBarsBack 0;

       if(
    ObjectType(TrendName)==OBJ_TREND)
         {
          
    price1=ObjectGet(TrendName,OBJPROP_PRICE1);
          
    T1=ObjectGet(TrendName,OBJPROP_TIME1);
          
    price2=ObjectGet(TrendName,OBJPROP_PRICE2);
          
    T2=ObjectGet(TrendName,OBJPROP_TIME2);
          
    LowBarsBack=iBarShift(NULL,0,T2);
          
    HighBarsBack=iBarShift(NULL,0,T1);
         }
       else
         {
          
    ClearChart();
          return(
    0);
         }

       if(
    T1<T2 && price1<price2)
         {
          
    FIBO100=price1;
          
    FIBO0=price2;
          
    Q=MathAbs(FIBO100-FIBO0);
          
    FIBO236=FIBO0-(Q*0.236);
          
    FIBO382=FIBO0-(Q*0.382);
          
    FIBO50=FIBO0-(Q*0.5);
          
    FIBO618=FIBO0-(Q*0.618);
          
    FIBO707=FIBO0-(Q*0.707);
          
    FIBO786=FIBO0-(Q*0.786);
          
    FIBO886=FIBO0-(Q*0.886);
         }
       else
         {
          
    FIBO100=price1;
          
    FIBO0=price2;
          
    Q=FIBO100-FIBO0;
          
    FIBO236=FIBO0+(Q*0.236);
          
    FIBO382=FIBO0+(Q*0.382);
          
    FIBO50=FIBO0+(Q*0.5);
          
    FIBO618=FIBO0+(Q*0.618);
          
    FIBO707=FIBO0+(Q*0.707);
          
    FIBO786=FIBO0+(Q*0.786);
          
    FIBO886=FIBO0+(Q*0.886);
         }

    //---- Fibo Lines ----//
       
    string gap="                               "// spaces in the text string
       
    string gap2="    ";

       
    TextBarsAhead=BarsAhead+textadd// makes one number from 2 for display calculation

       
    if(HighBarsBack>LowBarsBack){int length=HighBarsBack;}else{length=LowBarsBack;}

       if(
    Fibo_100_ShowText("FIB100 label"+TrendName,0,gap+TrendName+" 100.0%"+gap2+DoubleToStr(FIBO100,Digits),TextSize,TextFont,Fibo_100_Color,(Time[0]+TextBarsAhead*Period()*60),FIBO100,true);
       if(
    Fibo_0_ShowText("FIB0 label"+TrendName,0,gap+TrendName+" 0.0%"+gap2+DoubleToStr(FIBO0,Digits),TextSize,TextFont,Fibo_0_Color,(Time[0]+TextBarsAhead*Period()*60),FIBO0,true);
       if(
    Fibo_236_ShowText("FIB236 label"+TrendName,0,gap+TrendName+" 23.6%"+gap2+DoubleToStr(FIBO236,Digits),TextSize,TextFont,Fibo_236_Color,(Time[0]+TextBarsAhead*Period()*60),FIBO236,true);
       if(
    Fibo_382_ShowText("FIB382 label"+TrendName,0,gap+TrendName+" 38.2%"+gap2+DoubleToStr(FIBO382,Digits),TextSize,TextFont,Fibo_382_Color,(Time[0]+TextBarsAhead*Period()*60),FIBO382,true);
       if(
    Fibo_500_ShowText("FIB50 label"+TrendName,0,gap+TrendName+" 50.0%"+gap2+DoubleToStr(FIBO50,Digits),TextSize,TextFont,Fibo_500_Color,(Time[0]+TextBarsAhead*Period()*60),FIBO50,true);
       if(
    Fibo_618_ShowText("FIB618 label"+TrendName,0,gap+TrendName+" 61.8%"+gap2+DoubleToStr(FIBO618,Digits),TextSize,TextFont,Fibo_618_Color,(Time[0]+TextBarsAhead*Period()*60),FIBO618,true);
       if(
    Fibo_707_ShowText("FIB707 label"+TrendName,0,gap+TrendName+" 70.7%"+gap2+DoubleToStr(FIBO707,Digits),TextSize,TextFont,Fibo_707_Color,(Time[0]+TextBarsAhead*Period()*60),FIBO707,true);
       if(
    Fibo_786_ShowText("FIB786 label"+TrendName,0,gap+TrendName+" 78.6%"+gap2+DoubleToStr(FIBO786,Digits),TextSize,TextFont,Fibo_786_Color,(Time[0]+TextBarsAhead*Period()*60),FIBO786,true);
       if(
    Fibo_886_ShowText("FIB886 label"+TrendName,0,gap+TrendName+" 88.6%"+gap2+DoubleToStr(FIBO886,Digits),TextSize,TextFont,Fibo_886_Color,(Time[0]+TextBarsAhead*Period()*60),FIBO886,true);

    //------------------------------------------------------------
       
    if(HighBarsBack>LowBarsBack)
         {
          if(
    Fibo_100_ShowLevel("FIB100 line"+TrendName,0,FIBO100,FIBO100,Time[length],Fibo_100_Width,Fibo_100_Style,Fibo_100_Color,true);
          if(
    Fibo_0_ShowLevel("FIB0 line"+TrendName,0,FIBO0,FIBO0,Time[length],Fibo_0_Width,Fibo_0_Style,Fibo_0_Color,true);
          if(
    Fibo_236_ShowLevel("FIB236 line"+TrendName,0,FIBO236,FIBO236,Time[length],Fibo_236_Width,Fibo_236_Style,Fibo_236_Color,true);
          if(
    Fibo_382_ShowLevel("FIB382 line"+TrendName,0,FIBO382,FIBO382,Time[length],Fibo_382_Width,Fibo_382_Style,Fibo_382_Color,true);
          if(
    Fibo_500_ShowLevel("FIB50 line"+TrendName,0,FIBO50,FIBO50,Time[length],Fibo_500_Width,Fibo_500_Style,Fibo_500_Color,true);
          if(
    Fibo_618_ShowLevel("FIB618 line"+TrendName,0,FIBO618,FIBO618,Time[length],Fibo_618_Width,Fibo_618_Style,Fibo_618_Color,true);
          if(
    Fibo_707_ShowLevel("FIB707 line"+TrendName,0,FIBO707,FIBO707,Time[length],Fibo_707_Width,Fibo_707_Style,Fibo_707_Color,true);
          if(
    Fibo_786_ShowLevel("FIB786 line"+TrendName,0,FIBO786,FIBO786,Time[length],Fibo_786_Width,Fibo_786_Style,Fibo_786_Color,true);
          if(
    Fibo_886_ShowLevel("FIB886 line"+TrendName,0,FIBO886,FIBO886,Time[length],Fibo_886_Width,Fibo_886_Style,Fibo_886_Color,true);
         }
       else
         {
          if(
    Fibo_100_ShowLevel("FIB100 line"+TrendName,0,FIBO100,FIBO100,Time[length],Fibo_100_Width,Fibo_100_Style,Fibo_100_Color,true);
          if(
    Fibo_0_ShowLevel("FIB0 line"+TrendName,0,FIBO0,FIBO0,Time[length],Fibo_0_Width,Fibo_0_Style,Fibo_0_Color,true);
          if(
    Fibo_236_ShowLevel("FIB236 line"+TrendName,0,FIBO236,FIBO236,Time[length],Fibo_236_Width,Fibo_236_Style,Fibo_236_Color,true);
          if(
    Fibo_382_ShowLevel("FIB382 line"+TrendName,0,FIBO382,FIBO382,Time[length],Fibo_382_Width,Fibo_382_Style,Fibo_382_Color,true);
          if(
    Fibo_500_ShowLevel("FIB50 line"+TrendName,0,FIBO50,FIBO50,Time[length],Fibo_500_Width,Fibo_500_Style,Fibo_500_Color,true);
          if(
    Fibo_618_ShowLevel("FIB618 line"+TrendName,0,FIBO618,FIBO618,Time[length],Fibo_618_Width,Fibo_618_Style,Fibo_618_Color,true);
          if(
    Fibo_707_ShowLevel("FIB707 line"+TrendName,0,FIBO707,FIBO707,Time[length],Fibo_707_Width,Fibo_707_Style,Fibo_707_Color,true);
          if(
    Fibo_786_ShowLevel("FIB786 line"+TrendName,0,FIBO786,FIBO786,Time[length],Fibo_786_Width,Fibo_786_Style,Fibo_786_Color,true);
          if(
    Fibo_886_ShowLevel("FIB886 line"+TrendName,0,FIBO886,FIBO886,Time[length],Fibo_886_Width,Fibo_886_Style,Fibo_886_Color,true);
         }

       return(
    0);
      }
    //+------------------------------------------------------------------+
    //| Level                                                            |
    //+------------------------------------------------------------------+
    void Level(string Levels,int Window,double start,double end,double time,double w,double s,color clr,bool del)
      {
       if(
    delObjectDelete(Levels);
       if(
    ObjectFind(Levels)!=0)
         {
          
    ObjectCreate(Levels,OBJ_TREND,0,0,start,(Time[0]+BarsAhead*Period()*60),end);
          
    ObjectSet(Levels,OBJPROP_COLOR,clr);
          
    ObjectSet(Levels,OBJPROP_RAY,false);
          
    ObjectSet(Levels,OBJPROP_BACK,true);
          
    ObjectSet(Levels,OBJPROP_WIDTH,w);
          
    ObjectSet(Levels,OBJPROP_STYLE,s);
          
    ObjectSet(Levels,OBJPROP_TIME1,time);
         }
       else
          
    ObjectMove(Levels,0,0,(Time[0]+BarsAhead*Period()*60));
      }
    //+------------------------------------------------------------------+
    //| Text                                                             |
    //+------------------------------------------------------------------+
    void Text(string TextName,int Window,string LabelText,int FontSize,string FontName,color TextColor,datetime Time1,double Price1,bool del)
      {
       if(
    delObjectDelete(TextName);
       if(
    ObjectFind(TextName)!=0)
         {
          
    ObjectCreate(TextName,OBJ_TEXT,Window,Time1,Price1);
          
    ObjectSetText(TextName,LabelText,FontSize,FontName,TextColor);
          
    ObjectSet(TextName,OBJPROP_BACK,true);
         }
       else
          
    ObjectMove(TextName,0,Time1,Price1);
      }
    //+------------------------------------------------------------------+
    //| ClearChart                                                       |
    //+------------------------------------------------------------------+
    void ClearChart()
      {
       
    ObjectDelete("FIB100 Label"+TrendName);
       
    ObjectDelete("FIB100 Line"+TrendName);
       
    ObjectDelete("FIB0 Label"+TrendName);
       
    ObjectDelete("FIB0 Line"+TrendName);
       
    ObjectDelete("FIB236 Label"+TrendName);
       
    ObjectDelete("FIB236 Line"+TrendName);
       
    ObjectDelete("FIB382 Label"+TrendName);
       
    ObjectDelete("FIB382 Line"+TrendName);
       
    ObjectDelete("FIB50 Label"+TrendName);
       
    ObjectDelete("FIB50 Line"+TrendName);
       
    ObjectDelete("FIB618 Label"+TrendName);
       
    ObjectDelete("FIB618 Line"+TrendName);
       
    ObjectDelete("FIB707 Label"+TrendName);
       
    ObjectDelete("FIB707 Line"+TrendName);
       
    ObjectDelete("FIB786 Line"+TrendName);
       
    ObjectDelete("FIB786 Label"+TrendName);
       
    ObjectDelete("FIB886 Line"+TrendName);
       
    ObjectDelete("FIB886 Label"+TrendName);
       return;
      }
    //+------------------------------------------------------------------+ 
    multi pivots

    كود PHP:
    //+------------------------------------------------------------------+
    //|                                                 Multi Pivots.mq4 |
    //|                                Converted to MT4 / MQ4 by Flash52 |
    //|                [email protected] |
    //+------------------------------------------------------------------+
    #property copyright "Converted to MT4 / MQ4 by Flash52"
    #property link      "[email protected]"
    //----
    // This indicator allows the user to select which set(s) of pivots they wish to display.
    // If your favorite pivot is not included, simply add it in or modify one of the existing pivots
    //----
    #property indicator_chart_window

    extern int Show_Woodies_Pivots 1;    // 1 = Yes, 0 = No
    extern int Show_Camarilla_Pivots 1;  // 1 = Yes, 0 = No
    extern int Show_Demark_Pivots 1;     // 1 = Yes, 0 = No
    extern int Show_Standard_Pivots 0;   // 1 = Yes, 0 = No

    datetime prevtime=0;
    datetime prev_day=0;
    datetime cur_day=0;
    double rates_d1[2][6];
    double day_high=0;    
    double day_low=0;    
    double yesterday_high=0;
    double yesterday_open=0;            
    double yesterday_low=0;            
    double yesterday_close=0;
    double today_open=0;

    //+------------------------------------------------------------------+
    //| Custom indicator initialization function                         |
    //+------------------------------------------------------------------+
    int init()
      {
    //---- indicators
    //----
       
    return(0);
      }
    //+------------------------------------------------------------------+
    //| Custom indicator deinitialization function                       |
    //+------------------------------------------------------------------+
    int deinit()
      {
    //---- TODO: add your code here
       
    //----
       
    return(0);
      }
    //+------------------------------------------------------------------+
    //| Multi Daily Pivots iteration function                            |
    //+------------------------------------------------------------------+
    int start()
      {
        
    int    counted_bars=IndicatorCounted();
    //---- initialize local variables

       
    double r2=0;
       
    double r1=0;
       
    double p=0;
       
    double s1=0;
       
    double s2=0;
       
    double sr3=0;
       
    double sr2=0;
       
    double sr1=0;
       
    double sp=0;
       
    double ss1=0;
       
    double ss2=0;
       
    double ss3=0;
       
    double ch1=0;
       
    double ch2=0;
       
    double ch3=0;
       
    double ch4=0;
       
    double cl1=0;
       
    double cl2=0;
       
    double cl3=0;
       
    double cl4=0;
       
    double D1=0.091667;
       
    double D2=0.183333;
       
    double D3=0.2750;
       
    double D4=0.55;
       
    double dr=0;
       
    double ds=0;
       
    double x=0;
       
    string ch3_text="";

       
    //---- exit if period is greater than daily charts  
       
    if(Period() > 1440)
       {
          Print(
    "Error - Chart period is greater than 1 day.");
          return(-
    1);   // then exit 
       
    }
    //---- If the day has changed then get new daily rates & recalculate pivots
    //---- Check for day change once each new bar
    //---- Allow labels & lines to be redrawn each bar

       
    if(prevtime == Time[0])return(0); // exit unless new bar
       
    prevtime Time[0]; // reset to current bar time
          
    cur_day Day();
          if(
    prev_day != cur_day
          {
          
    ArrayCopyRates(rates_d1Symbol(), PERIOD_D1);
            
          
    yesterday_close rates_d1[1][4];
          
    yesterday_open rates_d1[1][1];
          
    today_open rates_d1[0][1];
          
    yesterday_high rates_d1[1][3];
          
    yesterday_low rates_d1[1][2];
          
    prev_day cur_day;
          }

    //---- Calculate Standard Pivots
       
    if(Show_Standard_Pivots == 1)   
       {
          
    sp = (yesterday_high+yesterday_low+yesterday_close+today_open)/4;
            
    sr1 = (2*sp)-yesterday_low;
            
    ss1 = (2*sp)-yesterday_high;
            
    sr2 sp+(yesterday_high-yesterday_low);
            
    ss2 sp-(yesterday_high+yesterday_low);
            
    sr3 = (2*sp)-yesterday_low-yesterday_low+yesterday_high;
            
    ss3 = (2*sp)-yesterday_high-yesterday_high+yesterday_low;    

    //---- Set standard pivot line labels on chart window 

          
    if(ObjectFind("SR1 label") != 0)
          {
             
    ObjectCreate("SR1 label"OBJ_TEXT0Time[20], sr1);
             
    ObjectSetText("SR1 label""R1 "+DoubleToStr(sr1,4), 8"Arial"White);
          }
          else
          {
             
    ObjectSetText("SR1 label""R1 "+DoubleToStr(sr1,4), 8"Arial"White);
             
    ObjectMove("SR1 label"0Time[20], sr1);
          }
       
          if(
    ObjectFind("SR2 label") != 0)
          {
             
    ObjectCreate("SR2 label"OBJ_TEXT0Time[20], sr2);
             
    ObjectSetText("SR2 label""R2 "+DoubleToStr(sr2,4), 8"Arial"White);
          }
          else
          {
             
    ObjectSetText("SR2 label""R2 "+DoubleToStr(sr2,4), 8"Arial"White);
             
    ObjectMove("SR2 label"0Time[20], sr2);
          }
          
          if(
    ObjectFind("SR3 label") != 0)
          {
             
    ObjectCreate("SR3 label"OBJ_TEXT0Time[20], sr3);
             
    ObjectSetText("SR3 label""R3 "+DoubleToStr(sr3,4), 8"Arial"White);
          }
          else
          {
             
    ObjectSetText("SR3 label""R3 "+DoubleToStr(sr3,4), 8"Arial"White);
             
    ObjectMove("SR3 label"0Time[20], sr3);
          }
          
          if(
    ObjectFind("SP label") != 0)
          {
             
    ObjectCreate("SP label"OBJ_TEXT0Time[20], sp);
             
    ObjectSetText("SP label""Pivot "+DoubleToStr(sp,4), 8"Arial"White);
          }
          else
          {
             
    ObjectSetText("SP label""Pivot "+DoubleToStr(sp,4), 8"Arial"White);
             
    ObjectMove("SP label"0Time[20], sp);
          }
       
          if(
    ObjectFind("SS1 label") != 0)
          {
             
    ObjectCreate("SS1 label"OBJ_TEXT0Time[20], ss1);
             
    ObjectSetText("SS1 label""S1 "+DoubleToStr(ss1,4), 8"Arial"White);
          }
          else
          {
             
    ObjectSetText("SS1 label""S1 "+DoubleToStr(ss1,4), 8"Arial"White);
             
    ObjectMove("SS1 label"0Time[20], ss1);
          }
       
          if(
    ObjectFind("SS2 label") != 0)
          {
             
    ObjectCreate("SS2 label"OBJ_TEXT0Time[20], ss2);
             
    ObjectSetText("S2 label""S2 "+DoubleToStr(ss2,4), 8"Arial"White);
          }
          else
          {
             
    ObjectSetText("SS2 label""S2 "+DoubleToStr(ss2,4), 8"Arial"White);
             
    ObjectMove("SS2 label"0Time[20], ss2);
          }
       
          if(
    ObjectFind("SS3 label") != 0)
          {
             
    ObjectCreate("SS3 label"OBJ_TEXT0Time[20], ss3);
             
    ObjectSetText("SS3 label""S3 "+DoubleToStr(ss3,4), 8"Arial"White);
          }
          else
          {
             
    ObjectSetText("SS3 label""S3 "+DoubleToStr(ss3,4), 8"Arial"White);
             
    ObjectMove("SS3 label"0Time[20], ss3);
          }
          
    //---- Set standard pivot lines on chart window    
       
          
    if(ObjectFind("SS1 line") != 0)
          {
             
    ObjectCreate("SS1 line"OBJ_HLINE0Time[40], ss1);
             
    ObjectSet("SS1 line"OBJPROP_STYLESTYLE_DASHDOTDOT);
             
    ObjectSet("SS1 line"OBJPROP_COLORLimeGreen);
          }
          else
          {
             
    ObjectMove("SS1 line"0Time[40], ss1);
          }
       
          if(
    ObjectFind("SS2 line") != 0)
          {
             
    ObjectCreate("SS2 line"OBJ_HLINE0Time[40], ss2);
             
    ObjectSet("SS2 line"OBJPROP_STYLESTYLE_DASHDOTDOT);
             
    ObjectSet("SS2 line"OBJPROP_COLORLimeGreen);
          }
          else
          {
             
    ObjectMove("SS2 line"0Time[40], ss2);
          }
       
          if(
    ObjectFind("SS3 line") != 0)
          {
             
    ObjectCreate("SS3 line"OBJ_HLINE0Time[40], ss3);
             
    ObjectSet("SS3 line"OBJPROP_STYLESTYLE_DASHDOTDOT);
             
    ObjectSet("SS3 line"OBJPROP_COLORLimeGreen);
          }
          else
          {
             
    ObjectMove("SS3 line"0Time[40], ss3);
          }
       
          if(
    ObjectFind("SP line") != 0)
          {
             
    ObjectCreate("SP line"OBJ_HLINE0Time[40], sp);
             
    ObjectSet("SP line"OBJPROP_STYLESTYLE_DASHDOTDOT);
             
    ObjectSet("SP line"OBJPROP_COLORMagenta);
          }
          else
          {
             
    ObjectMove("SP line"0Time[40], sp);
          }
       
          if(
    ObjectFind("SR1 line") != 0)
          {
             
    ObjectCreate("SR1 line"OBJ_HLINE0Time[40], sr1);
             
    ObjectSet("SR1 line"OBJPROP_STYLESTYLE_DASHDOTDOT);
             
    ObjectSet("SR1 line"OBJPROP_COLOROrangeRed);
          }
          else
          {
             
    ObjectMove("SR1 line"0Time[40], sr1);
          }
       
          if(
    ObjectFind("SR2 line") != 0)
          {
             
    ObjectCreate("SR2 line"OBJ_HLINE0Time[40], sr2);
             
    ObjectSet("SR2 line"OBJPROP_STYLESTYLE_DASHDOTDOT);
             
    ObjectSet("SR2 line"OBJPROP_COLOROrangeRed);
          }
          else
          {
             
    ObjectMove("SR2 line"0Time[40], sr2);
          }
          
          if(
    ObjectFind("SR3 line") != 0)
          {
             
    ObjectCreate("SR3 line"OBJ_HLINE0Time[40], sr3);
             
    ObjectSet("SR3 line"OBJPROP_STYLESTYLE_DASHDOTDOT);
             
    ObjectSet("SR3 line"OBJPROP_COLOROrangeRed);
          }
          else
          {
             
    ObjectMove("SR3 line"0Time[40], sr3);
          }
       }
    //---- End Of standard pivots      
    //----------------------------------------------------------------------------------------------      
    //---- Calculate Woody Pivots
       
    if(Show_Woodies_Pivots == 1)
       {
          
    = (yesterday_high yesterday_low today_open today_open) / 4;// Woodies Pivot
           
    r1 = (2*p)-yesterday_low;
           
    s1 = (2*p)-yesterday_high;
           
    r2 p+(yesterday_high yesterday_low);
           
    s2 p-(yesterday_high yesterday_low);
     
    //---- Set Woody pivot line labels on chart window 

          
    if(ObjectFind("R1 label") != 0)
          {
             
    ObjectCreate("R1 label"OBJ_TEXT0Time[20], r1);
             
    ObjectSetText("R1 label""Woodies R1 "+DoubleToStr(r1,4), 8"Arial"White);
          }
          else
          {
             
    ObjectSetText("R1 label""Woodies R1 "+DoubleToStr(r1,4), 8"Arial"White);
             
    ObjectMove("R1 label"0Time[20], r1);
          }
       
          if(
    ObjectFind("R2 label") != 0)
          {
             
    ObjectCreate("R2 label"OBJ_TEXT0Time[20], r2);
             
    ObjectSetText("R2 label""Woodies R2 "+DoubleToStr(r2,4), 8"Arial"White);
          }
          else
          {
             
    ObjectSetText("R2 label""Woodies R2 "+DoubleToStr(r2,4), 8"Arial"White);
             
    ObjectMove("R2 label"0Time[20], r2);
          }
          
          if(
    ObjectFind("P label") != 0)
          {
             
    ObjectCreate("P label"OBJ_TEXT0Time[20], p);
             
    ObjectSetText("P label""Woodies Pivot "+DoubleToStr(p,4), 8"Arial"White);
          }
          else
          {
             
    ObjectSetText("P label""Woodies Pivot "+DoubleToStr(p,4), 8"Arial"White);
             
    ObjectMove("P label"0Time[20], p);
          }
       
          if(
    ObjectFind("S1 label") != 0)
          {
             
    ObjectCreate("S1 label"OBJ_TEXT0Time[20], s1);
             
    ObjectSetText("S1 label""Woodies S1 "+DoubleToStr(s1,4), 8"Arial"White);
          }
          else
          {
             
    ObjectSetText("S1 label""Woodies S1 "+DoubleToStr(s1,4), 8"Arial"White);
             
    ObjectMove("S1 label"0Time[20], s1);
          }
       
          if(
    ObjectFind("S2 label") != 0)
          {
             
    ObjectCreate("S2 label"OBJ_TEXT0Time[20], s2);
             
    ObjectSetText("S2 label""Woodies S2 "+DoubleToStr(s2,4), 8"Arial"White);
          }
          else
          {
             
    ObjectSetText("S2 label""Woodies S2 "+DoubleToStr(s2,4), 8"Arial"White);
             
    ObjectMove("S2 label"0Time[20], s2);
          }     
       
    //---- Set Woody pivot lines on chart window    
       
          
    if(ObjectFind("S1 line") != 0)
          {
             
    ObjectCreate("S1 line"OBJ_HLINE0Time[40], s1);
             
    ObjectSet("S1 line"OBJPROP_STYLESTYLE_DASHDOTDOT);
             
    ObjectSet("S1 line"OBJPROP_COLORLimeGreen);
          }
          else
          {
             
    ObjectMove("S1 line"0Time[40], s1);
          }
       
          if(
    ObjectFind("S2 line") != 0)
          {
             
    ObjectCreate("S2 line"OBJ_HLINE0Time[40], s2);
             
    ObjectSet("S2 line"OBJPROP_STYLESTYLE_DASHDOTDOT);
             
    ObjectSet("S2 line"OBJPROP_COLORLimeGreen);
          }
          else
          {
             
    ObjectMove("S2 line"0Time[40], s2);
          }
       
          if(
    ObjectFind("P line") != 0)
          {
             
    ObjectCreate("P line"OBJ_HLINE0Time[40], p);
             
    ObjectSet("P line"OBJPROP_STYLESTYLE_DASHDOTDOT);
             
    ObjectSet("P line"OBJPROP_COLORMagenta);
          }
          else
          {
             
    ObjectMove("P line"0Time[40], p);
          }
       
          if(
    ObjectFind("R1 line") != 0)
          {
             
    ObjectCreate("R1 line"OBJ_HLINE0Time[40], r1);
             
    ObjectSet("R1 line"OBJPROP_STYLESTYLE_DASHDOTDOT);
             
    ObjectSet("R1 line"OBJPROP_COLOROrangeRed);
          }
          else
          {
             
    ObjectMove("R1 line"0Time[40], r1);
          }
       
          if(
    ObjectFind("R2 line") != 0)
          {
             
    ObjectCreate("R2 line"OBJ_HLINE0Time[40], r2);
             
    ObjectSet("R2 line"OBJPROP_STYLESTYLE_DASHDOTDOT);
             
    ObjectSet("R2 line"OBJPROP_COLOROrangeRed);
          }
          else
          {
             
    ObjectMove("R2 line"0Time[40], r2);
          }
       }
    //---- End Of Woodies Pivots
    //--------------------------------------------------------------------------------------------- 
    //---- Calculate & Display Camarilla Equation Pivots 

       
    if(Show_Camarilla_Pivots == 1)
       {
    //---- To display all 8 Camarilla pivots remove comment symbols and
    //     add the appropriate object functions below 
       
       //    ch1 = ((yesterday_high - yesterday_low) * D1) + yesterday_close;
       //    ch2 = ((yesterday_high - yesterday_low) * D2) + yesterday_close;
           
    ch3 = ((yesterday_high yesterday_low)* D3) + yesterday_close;
           
    ch4 = ((yesterday_high yesterday_low)* D4) + yesterday_close;
       
    //    cl1 = yesterday_close - ((yesterday_high - yesterday_low)*(D1));
       //    cl2 = yesterday_close - ((yesterday_high - yesterday_low)*(D2));
           
    cl3 yesterday_close - ((yesterday_high yesterday_low)*(D3));
           
    cl4 yesterday_close - ((yesterday_high yesterday_low)*(D4));
     
    //---- Set Camarilla pivots line labels on chart window 

          
    if(ObjectFind("CH3") != 0)
          {
             
    ObjectCreate("CH3"OBJ_TEXT0Time[35], ch3);
             
    ObjectSetText("CH3","Camarilla H3 "+DoubleToStr(ch3,4) , 8"Arial"White);
          }
          else
          {
             
    ObjectSetText("CH3","Camarilla H3 "+DoubleToStr(ch3,4) , 8"Arial"White);
             
    ObjectMove("CH3"0Time[35], ch3);
          }
       
          if(
    ObjectFind("CH4") != 0)
          {
             
    ObjectCreate("CH4"OBJ_TEXT0Time[35], ch4);
             
    ObjectSetText("CH4""Camarilla H4 "+DoubleToStr(ch4,4), 8"Arial"White);
          }
          else
          {
             
    ObjectSetText("CH4""Camarilla H4 "+DoubleToStr(ch4,4), 8"Arial"White);
             
    ObjectMove("CH4"0Time[35], ch4);
          }
       
          if(
    ObjectFind("CL3") != 0)
          {
             
    ObjectCreate("CL3"OBJ_TEXT0Time[35], cl3);
             
    ObjectSetText("CL3""Camarilla L3 "+DoubleToStr(cl3,4), 8"Arial"White);
          }
          else
          {
             
    ObjectSetText("CL3""Camarilla L3 "+DoubleToStr(cl3,4), 8"Arial"White);
             
    ObjectMove("CL3"0Time[35 ], cl3);
          }
          
          if(
    ObjectFind("CL4") != 0)
          {
             
    ObjectCreate("CL4"OBJ_TEXT0Time35], cl4);
             
    ObjectSetText("CL4""Camarilla L4 "+DoubleToStr(cl4,4), 8"Arial"White);
          }
          else
          {
             
    ObjectSetText("CL4""Camarilla L4 "+DoubleToStr(cl4,4), 8"Arial"White);
             
    ObjectMove("CL4"0Time[35], cl4);
          }
       
    //---- Set Camarilla pivots lines on chart window    
       
          
    if(ObjectFind("CH3line") != 0)
          {
             
    ObjectCreate("CH3line"OBJ_HLINE0Time[40], ch3);
             
    ObjectSet("CH3line"OBJPROP_STYLESTYLE_DOT);
             
    ObjectSet("CH3line"OBJPROP_COLORRed);
          }
          else
          {
             
    ObjectMove("CH3line"0Time[40], ch3);
          }
       
          if(
    ObjectFind("CH4line") != 0)
          {
             
    ObjectCreate("CH4line"OBJ_HLINE0Time[40], ch4);
             
    ObjectSet("CH4line"OBJPROP_STYLESTYLE_DOT);
             
    ObjectSet("CH4line"OBJPROP_COLORDodgerBlue);
          }
          else
          {
             
    ObjectMove("CH4line"0Time[40], ch4);
          }
       
          if(
    ObjectFind("CL3line") != 0)
          {
             
    ObjectCreate("CL3line"OBJ_HLINE0Time[40], cl3);
             
    ObjectSet("CL3line"OBJPROP_STYLESTYLE_DOT);
             
    ObjectSet("CL3line"OBJPROP_COLORRed);
          }
          else
          {
             
    ObjectMove("CL3line"0Time[40], cl3);
          }
       
          if(
    ObjectFind("CL4line") != 0)
          {
             
    ObjectCreate("CL4line"OBJ_HLINE0Time[40], cl4);
             
    ObjectSet("CL4line"OBJPROP_STYLESTYLE_DOT);
             
    ObjectSet("CL4line"OBJPROP_COLORDodgerBlue);
          }
          else
          {
             
    ObjectMove("CL4line"0Time[40], cl4);
          }
       }
    //---- End Of Camarilla Pivots
    //----------------------------------------------------------------------------------------------
    //---- Calculate DeMark Pivots (Projected Daily High & Low)
       
    if(Show_Demark_Pivots == 1)
       {
           if(
    yesterday_close yesterday_open)
           {
               
    = (yesterday_high + (2yesterday_low) + yesterday_close);
           }
           if(
    yesterday_close yesterday_open)
           {
               
    = ((yesterday_high*2)    + yesterday_low    yesterday_close);
           }
           if(
    yesterday_close == yesterday_open)
           {
               
    = (yesterday_high yesterday_low + (2yesterday_close));
           }    
        
           
    dr = (x/yesterday_low); //projected high
           
    ds = (x/yesterday_high); //projected low
     
    //---- Set DeMark pivots line labels on chart window 

          
    if(ObjectFind("DS Label") != 0)
          {
             
    ObjectCreate("DS Label"OBJ_TEXT0Time[55], ds);
             
    ObjectSetText("DS Label""DeMark Projected Low "+DoubleToStr(ds,4), 8"Arial"White);
          }
          else
          {
             
    ObjectSetText("DS Label""DeMark Projected Low "+DoubleToStr(ds,4), 8"Arial"White);
             
    ObjectMove("DS Label"0Time[55], ds);
          }
       
          if(
    ObjectFind("DR Label") != 0)
          {
             
    ObjectCreate("DR Label"OBJ_TEXT0Time[55], dr);
             
    ObjectSetText("DR Label""DeMark Projected High "+DoubleToStr(dr,4), 8"Arial"White);
          }
          else
          {
             
    ObjectSetText("DR Label""DeMark Projected High "+DoubleToStr(dr,4), 8"Arial"White);
             
    ObjectMove("DR Label"0Time[55], dr);
          }
        
    //---- Set DeMark pivots lines on chart window    
       
          
    if(ObjectFind("DS Line") != 0)
          {
             
    ObjectCreate("DS Line"OBJ_HLINE0Time[50], ds);
             
    ObjectSet("DS Line"OBJPROP_STYLESTYLE_DASHDOT);
             
    ObjectSet("DS Line"OBJPROP_COLORRed);
          }
          else
          {
             
    ObjectMove("DS Line"0Time[50], ds);
          }
       
          if(
    ObjectFind("DR Line") != 0)
          {
             
    ObjectCreate("DR Line"OBJ_HLINE0Time[50], dr);
             
    ObjectSet("DR Line"OBJPROP_STYLESTYLE_DASHDOT);
             
    ObjectSet("DR Line"OBJPROP_COLORLime);
          }
          else
          {
             
    ObjectMove("DR Line"0Time[50], dr);
          } 
       }
    //---- End Of Demark Pivots
    //----------------------------------------------------------------------------------------------    
    //---- Done
       
    return(0);
    }
    //+------------------------------------------------------------------+ 
    الملفات المرفقة الملفات المرفقة

  7. #8392
    الصورة الرمزية zied78
    zied78 غير متواجد حالياً عضو المتداول العربي
    تاريخ التسجيل
    Jul 2017
    الإقامة
    تونس
    المشاركات
    33

    افتراضي تعديل على المتغيرات الخارجية

    السلام عليكم اساتذتنا الكرام اريد معرفة كيفية التعديل على المتغير الخارجي ليضهر ايضا في خانة تغيير الالوان كهذا المثال لمؤشر fibo independance وايضا كيفية اضافتها في المؤشرات اللتى لا تحتوي على متغيرات خارجية كمؤشر multi pivots و شكرا اخواني .

    اضغط على الصورة لعرض أكبر

الاســـم:	fibo independance edit.jpg
المشاهدات:	45
الحجـــم:	155.3 كيلوبايت
الرقم:	470391
    اضغط على الصورة لعرض أكبر

الاســـم:	Multi pivots edit.jpg
المشاهدات:	41
الحجـــم:	155.7 كيلوبايت
الرقم:	470392

    fibo independance
    كود PHP:
    //+------------------------------------------------------------------+
    //|                                            [LEFT]Fibo_Independence.mq4 |
    //|                                         Copyright © 2012, bdeyes |
    //|                                              [email protected] |
    //+------------------------------------------------------------------+
    #property copyright "Copyright © 2012, bdeyes"
    #property link      "[email protected]"
    #property indicator_chart_window


    /*
    To use:

    Place indicator on your chart.

    Setting "TrendName" to unique value will allow the
    running of multiple copies of the indicator.
    (this allows you to use multiple fibs at the same time to look 
    for areas of confluence) 

    Draw a trendline where you want the fibonacci levels calculated
    (same as you would to use the MT4 fib retracement tool). Open the 
    trendline properties box and name the trendline the same as the name 
    at TrendName - i.e. "Fib1".

    Fib levels will calculate on next tick or you can refresh your chart.

    To make changes open the indicator properties box and make adjustments

    You can choose which levels to display, what color the lines are, what width
    the lines are, and what style the lines are all without redrawing the fib.

    To make any of the settings the "default" make changes in MetaEditor and then
    compile the indicator again.

    To make multiple settings for multiple TrendNames, make your settings 
    and then save everything as a template.


    */

    // -------- External Variables --------------------------------------+

    extern string TrendName="Fib1"// Unique name of trend line to place fib on.

    extern string Note1="Set \"true\" to show line";
    extern bool Fibo_0_Show=true;
    extern bool Fibo_100_Show true;
    extern bool Fibo_236_Show false;
    extern bool Fibo_382_Show true;
    extern bool Fibo_500_Show false;
    extern bool Fibo_618_Show true;
    extern bool Fibo_707_Show false;
    extern bool Fibo_786_Show true;
    extern bool Fibo_886_Show true;

    extern string Note2="Select line colors";
    extern color Fibo_0_Color   DimGray;
    extern color Fibo_236_Color Khaki;
    extern color Fibo_382_Color Red;
    extern color Fibo_500_Color FireBrick;
    extern color Fibo_618_Color Blue;
    extern color Fibo_707_Color Magenta;
    extern color Fibo_786_Color DarkViolet;
    extern color Fibo_886_Color Green;
    extern color Fibo_100_Color DimGray;

    extern string Note3 "Select line width";
    extern string Note4 "setting 0 - 4";
    extern int Fibo_0_Width   0;
    extern int Fibo_236_Width 0;
    extern int Fibo_382_Width 1;
    extern int Fibo_500_Width 0;
    extern int Fibo_618_Width 1;
    extern int Fibo_707_Width 0;
    extern int Fibo_786_Width 0;
    extern int Fibo_886_Width 0;
    extern int Fibo_100_Width 0;

    extern string Note5 "Select line style";
    extern string Note6 "setting 0 = solid";
    extern string Note7 "setting 1 = dash";
    extern string Note8 "setting 2 = dot";
    extern string Note9 "setting 3 = dashdot";
    extern string Note10 "setting 4 = dashdotdot";
    extern string Note11 "Only works with";
    extern string Note12 "line width > 2";
    extern int Fibo_0_Style   1;
    extern int Fibo_236_Style 1;
    extern int Fibo_382_Style 0;
    extern int Fibo_500_Style 1;
    extern int Fibo_618_Style 0;
    extern int Fibo_707_Style 1;
    extern int Fibo_786_Style 0;
    extern int Fibo_886_Style 0;
    extern int Fibo_100_Style 1;

    extern int TextSize=10// text size for price & fib number
    extern string TextFont="Arial"//text to use for display font
    extern string Note0="To extend line beyond of price";
    extern int BarsAhead=12// Number of bars ahead of current price to show line & text
    int TextBarsAhead=0;
    int textadd=5// move text off end of line this many bars
    //+------------------------------------------------------------------+
    //| Custom indicator initialization function                         |
    //+------------------------------------------------------------------+
    int init()
      {
    //---- indicator short name
       
    IndicatorShortName("Fibo_Independence"+TrendName);
    //---- initialization done
       
    return(0);
      }
    //+------------------------------------------------------------------+
    //| Custom indicator deinitialization function                       |
    //+------------------------------------------------------------------+
    int deinit()
      {
       
    ClearChart();

       return(
    0);
      }
    //+------------------------------------------------------------------+
    //| Custom indicator iteration function                              |
    //+------------------------------------------------------------------+
    int start()
      {
    //+---------------------+
    //| Fibo lines function |
    //+---------------------+
       
    double FIBO100,FIBO0,Q,FIBO236,FIBO382,FIBO50,FIBO618,FIBO707,FIBO786,FIBO886;
       
    double WaveStart,WaveEnd;
       
    double price1=0,price2=0;
       
    datetime T1,T2;
       
    int HighBarsBack0;
       
    int LowBarsBack 0;

       if(
    ObjectType(TrendName)==OBJ_TREND)
         {
          
    price1=ObjectGet(TrendName,OBJPROP_PRICE1);
          
    T1=ObjectGet(TrendName,OBJPROP_TIME1);
          
    price2=ObjectGet(TrendName,OBJPROP_PRICE2);
          
    T2=ObjectGet(TrendName,OBJPROP_TIME2);
          
    LowBarsBack=iBarShift(NULL,0,T2);
          
    HighBarsBack=iBarShift(NULL,0,T1);
         }
       else
         {
          
    ClearChart();
          return(
    0);
         }

       if(
    T1<T2 && price1<price2)
         {
          
    FIBO100=price1;
          
    FIBO0=price2;
          
    Q=MathAbs(FIBO100-FIBO0);
          
    FIBO236=FIBO0-(Q*0.236);
          
    FIBO382=FIBO0-(Q*0.382);
          
    FIBO50=FIBO0-(Q*0.5);
          
    FIBO618=FIBO0-(Q*0.618);
          
    FIBO707=FIBO0-(Q*0.707);
          
    FIBO786=FIBO0-(Q*0.786);
          
    FIBO886=FIBO0-(Q*0.886);
         }
       else
         {
          
    FIBO100=price1;
          
    FIBO0=price2;
          
    Q=FIBO100-FIBO0;
          
    FIBO236=FIBO0+(Q*0.236);
          
    FIBO382=FIBO0+(Q*0.382);
          
    FIBO50=FIBO0+(Q*0.5);
          
    FIBO618=FIBO0+(Q*0.618);
          
    FIBO707=FIBO0+(Q*0.707);
          
    FIBO786=FIBO0+(Q*0.786);
          
    FIBO886=FIBO0+(Q*0.886);
         }

    //---- Fibo Lines ----//
       
    string gap="                               "// spaces in the text string
       
    string gap2="    ";

       
    TextBarsAhead=BarsAhead+textadd// makes one number from 2 for display calculation

       
    if(HighBarsBack>LowBarsBack){int length=HighBarsBack;}else{length=LowBarsBack;}

       if(
    Fibo_100_ShowText("FIB100 label"+TrendName,0,gap+TrendName+" 100.0%"+gap2+DoubleToStr(FIBO100,Digits),TextSize,TextFont,Fibo_100_Color,(Time[0]+TextBarsAhead*Period()*60),FIBO100,true);
       if(
    Fibo_0_ShowText("FIB0 label"+TrendName,0,gap+TrendName+" 0.0%"+gap2+DoubleToStr(FIBO0,Digits),TextSize,TextFont,Fibo_0_Color,(Time[0]+TextBarsAhead*Period()*60),FIBO0,true);
       if(
    Fibo_236_ShowText("FIB236 label"+TrendName,0,gap+TrendName+" 23.6%"+gap2+DoubleToStr(FIBO236,Digits),TextSize,TextFont,Fibo_236_Color,(Time[0]+TextBarsAhead*Period()*60),FIBO236,true);
       if(
    Fibo_382_ShowText("FIB382 label"+TrendName,0,gap+TrendName+" 38.2%"+gap2+DoubleToStr(FIBO382,Digits),TextSize,TextFont,Fibo_382_Color,(Time[0]+TextBarsAhead*Period()*60),FIBO382,true);
       if(
    Fibo_500_ShowText("FIB50 label"+TrendName,0,gap+TrendName+" 50.0%"+gap2+DoubleToStr(FIBO50,Digits),TextSize,TextFont,Fibo_500_Color,(Time[0]+TextBarsAhead*Period()*60),FIBO50,true);
       if(
    Fibo_618_ShowText("FIB618 label"+TrendName,0,gap+TrendName+" 61.8%"+gap2+DoubleToStr(FIBO618,Digits),TextSize,TextFont,Fibo_618_Color,(Time[0]+TextBarsAhead*Period()*60),FIBO618,true);
       if(
    Fibo_707_ShowText("FIB707 label"+TrendName,0,gap+TrendName+" 70.7%"+gap2+DoubleToStr(FIBO707,Digits),TextSize,TextFont,Fibo_707_Color,(Time[0]+TextBarsAhead*Period()*60),FIBO707,true);
       if(
    Fibo_786_ShowText("FIB786 label"+TrendName,0,gap+TrendName+" 78.6%"+gap2+DoubleToStr(FIBO786,Digits),TextSize,TextFont,Fibo_786_Color,(Time[0]+TextBarsAhead*Period()*60),FIBO786,true);
       if(
    Fibo_886_ShowText("FIB886 label"+TrendName,0,gap+TrendName+" 88.6%"+gap2+DoubleToStr(FIBO886,Digits),TextSize,TextFont,Fibo_886_Color,(Time[0]+TextBarsAhead*Period()*60),FIBO886,true);

    //------------------------------------------------------------
       
    if(HighBarsBack>LowBarsBack)
         {
          if(
    Fibo_100_ShowLevel("FIB100 line"+TrendName,0,FIBO100,FIBO100,Time[length],Fibo_100_Width,Fibo_100_Style,Fibo_100_Color,true);
          if(
    Fibo_0_ShowLevel("FIB0 line"+TrendName,0,FIBO0,FIBO0,Time[length],Fibo_0_Width,Fibo_0_Style,Fibo_0_Color,true);
          if(
    Fibo_236_ShowLevel("FIB236 line"+TrendName,0,FIBO236,FIBO236,Time[length],Fibo_236_Width,Fibo_236_Style,Fibo_236_Color,true);
          if(
    Fibo_382_ShowLevel("FIB382 line"+TrendName,0,FIBO382,FIBO382,Time[length],Fibo_382_Width,Fibo_382_Style,Fibo_382_Color,true);
          if(
    Fibo_500_ShowLevel("FIB50 line"+TrendName,0,FIBO50,FIBO50,Time[length],Fibo_500_Width,Fibo_500_Style,Fibo_500_Color,true);
          if(
    Fibo_618_ShowLevel("FIB618 line"+TrendName,0,FIBO618,FIBO618,Time[length],Fibo_618_Width,Fibo_618_Style,Fibo_618_Color,true);
          if(
    Fibo_707_ShowLevel("FIB707 line"+TrendName,0,FIBO707,FIBO707,Time[length],Fibo_707_Width,Fibo_707_Style,Fibo_707_Color,true);
          if(
    Fibo_786_ShowLevel("FIB786 line"+TrendName,0,FIBO786,FIBO786,Time[length],Fibo_786_Width,Fibo_786_Style,Fibo_786_Color,true);
          if(
    Fibo_886_ShowLevel("FIB886 line"+TrendName,0,FIBO886,FIBO886,Time[length],Fibo_886_Width,Fibo_886_Style,Fibo_886_Color,true);
         }
       else
         {
          if(
    Fibo_100_ShowLevel("FIB100 line"+TrendName,0,FIBO100,FIBO100,Time[length],Fibo_100_Width,Fibo_100_Style,Fibo_100_Color,true);
          if(
    Fibo_0_ShowLevel("FIB0 line"+TrendName,0,FIBO0,FIBO0,Time[length],Fibo_0_Width,Fibo_0_Style,Fibo_0_Color,true);
          if(
    Fibo_236_ShowLevel("FIB236 line"+TrendName,0,FIBO236,FIBO236,Time[length],Fibo_236_Width,Fibo_236_Style,Fibo_236_Color,true);
          if(
    Fibo_382_ShowLevel("FIB382 line"+TrendName,0,FIBO382,FIBO382,Time[length],Fibo_382_Width,Fibo_382_Style,Fibo_382_Color,true);
          if(
    Fibo_500_ShowLevel("FIB50 line"+TrendName,0,FIBO50,FIBO50,Time[length],Fibo_500_Width,Fibo_500_Style,Fibo_500_Color,true);
          if(
    Fibo_618_ShowLevel("FIB618 line"+TrendName,0,FIBO618,FIBO618,Time[length],Fibo_618_Width,Fibo_618_Style,Fibo_618_Color,true);
          if(
    Fibo_707_ShowLevel("FIB707 line"+TrendName,0,FIBO707,FIBO707,Time[length],Fibo_707_Width,Fibo_707_Style,Fibo_707_Color,true);
          if(
    Fibo_786_ShowLevel("FIB786 line"+TrendName,0,FIBO786,FIBO786,Time[length],Fibo_786_Width,Fibo_786_Style,Fibo_786_Color,true);
          if(
    Fibo_886_ShowLevel("FIB886 line"+TrendName,0,FIBO886,FIBO886,Time[length],Fibo_886_Width,Fibo_886_Style,Fibo_886_Color,true);
         }

       return(
    0);
      }
    //+------------------------------------------------------------------+
    //| Level                                                            |
    //+------------------------------------------------------------------+
    void Level(string Levels,int Window,double start,double end,double time,double w,double s,color clr,bool del)
      {
       if(
    delObjectDelete(Levels);
       if(
    ObjectFind(Levels)!=0)
         {
          
    ObjectCreate(Levels,OBJ_TREND,0,0,start,(Time[0]+BarsAhead*Period()*60),end);
          
    ObjectSet(Levels,OBJPROP_COLOR,clr);
          
    ObjectSet(Levels,OBJPROP_RAY,false);
          
    ObjectSet(Levels,OBJPROP_BACK,true);
          
    ObjectSet(Levels,OBJPROP_WIDTH,w);
          
    ObjectSet(Levels,OBJPROP_STYLE,s);
          
    ObjectSet(Levels,OBJPROP_TIME1,time);
         }
       else
          
    ObjectMove(Levels,0,0,(Time[0]+BarsAhead*Period()*60));
      }
    //+------------------------------------------------------------------+
    //| Text                                                             |
    //+------------------------------------------------------------------+
    void Text(string TextName,int Window,string LabelText,int FontSize,string FontName,color TextColor,datetime Time1,double Price1,bool del)
      {
       if(
    delObjectDelete(TextName);
       if(
    ObjectFind(TextName)!=0)
         {
          
    ObjectCreate(TextName,OBJ_TEXT,Window,Time1,Price1);
          
    ObjectSetText(TextName,LabelText,FontSize,FontName,TextColor);
          
    ObjectSet(TextName,OBJPROP_BACK,true);
         }
       else
          
    ObjectMove(TextName,0,Time1,Price1);
      }
    //+------------------------------------------------------------------+
    //| ClearChart                                                       |
    //+------------------------------------------------------------------+
    void ClearChart()
      {
       
    ObjectDelete("FIB100 Label"+TrendName);
       
    ObjectDelete("FIB100 Line"+TrendName);
       
    ObjectDelete("FIB0 Label"+TrendName);
       
    ObjectDelete("FIB0 Line"+TrendName);
       
    ObjectDelete("FIB236 Label"+TrendName);
       
    ObjectDelete("FIB236 Line"+TrendName);
       
    ObjectDelete("FIB382 Label"+TrendName);
       
    ObjectDelete("FIB382 Line"+TrendName);
       
    ObjectDelete("FIB50 Label"+TrendName);
       
    ObjectDelete("FIB50 Line"+TrendName);
       
    ObjectDelete("FIB618 Label"+TrendName);
       
    ObjectDelete("FIB618 Line"+TrendName);
       
    ObjectDelete("FIB707 Label"+TrendName);
       
    ObjectDelete("FIB707 Line"+TrendName);
       
    ObjectDelete("FIB786 Line"+TrendName);
       
    ObjectDelete("FIB786 Label"+TrendName);
       
    ObjectDelete("FIB886 Line"+TrendName);
       
    ObjectDelete("FIB886 Label"+TrendName);
       return;
      }
    //+------------------------------------------------------------------+ 
    multi pivots

    كود PHP:
    //+------------------------------------------------------------------+
    //|                                                 Multi Pivots.mq4 |
    //|                                Converted to MT4 / MQ4 by Flash52 |
    //|                [email protected] |
    //+------------------------------------------------------------------+
    #property copyright "Converted to MT4 / MQ4 by Flash52"
    #property link      "[email protected]"
    //----
    // This indicator allows the user to select which set(s) of pivots they wish to display.
    // If your favorite pivot is not included, simply add it in or modify one of the existing pivots
    //----
    #property indicator_chart_window

    extern int Show_Woodies_Pivots 1;    // 1 = Yes, 0 = No
    extern int Show_Camarilla_Pivots 1;  // 1 = Yes, 0 = No
    extern int Show_Demark_Pivots 1;     // 1 = Yes, 0 = No
    extern int Show_Standard_Pivots 0;   // 1 = Yes, 0 = No

    datetime prevtime=0;
    datetime prev_day=0;
    datetime cur_day=0;
    double rates_d1[2][6];
    double day_high=0;    
    double day_low=0;    
    double yesterday_high=0;
    double yesterday_open=0;            
    double yesterday_low=0;            
    double yesterday_close=0;
    double today_open=0;

    //+------------------------------------------------------------------+
    //| Custom indicator initialization function                         |
    //+------------------------------------------------------------------+
    int init()
      {
    //---- indicators
    //----
       
    return(0);
      }
    //+------------------------------------------------------------------+
    //| Custom indicator deinitialization function                       |
    //+------------------------------------------------------------------+
    int deinit()
      {
    //---- TODO: add your code here
       
    //----
       
    return(0);
      }
    //+------------------------------------------------------------------+
    //| Multi Daily Pivots iteration function                            |
    //+------------------------------------------------------------------+
    int start()
      {
        
    int    counted_bars=IndicatorCounted();
    //---- initialize local variables

       
    double r2=0;
       
    double r1=0;
       
    double p=0;
       
    double s1=0;
       
    double s2=0;
       
    double sr3=0;
       
    double sr2=0;
       
    double sr1=0;
       
    double sp=0;
       
    double ss1=0;
       
    double ss2=0;
       
    double ss3=0;
       
    double ch1=0;
       
    double ch2=0;
       
    double ch3=0;
       
    double ch4=0;
       
    double cl1=0;
       
    double cl2=0;
       
    double cl3=0;
       
    double cl4=0;
       
    double D1=0.091667;
       
    double D2=0.183333;
       
    double D3=0.2750;
       
    double D4=0.55;
       
    double dr=0;
       
    double ds=0;
       
    double x=0;
       
    string ch3_text="";

       
    //---- exit if period is greater than daily charts  
       
    if(Period() > 1440)
       {
          Print(
    "Error - Chart period is greater than 1 day.");
          return(-
    1);   // then exit 
       
    }
    //---- If the day has changed then get new daily rates & recalculate pivots
    //---- Check for day change once each new bar
    //---- Allow labels & lines to be redrawn each bar

       
    if(prevtime == Time[0])return(0); // exit unless new bar
       
    prevtime Time[0]; // reset to current bar time
          
    cur_day Day();
          if(
    prev_day != cur_day
          {
          
    ArrayCopyRates(rates_d1Symbol(), PERIOD_D1);
            
          
    yesterday_close rates_d1[1][4];
          
    yesterday_open rates_d1[1][1];
          
    today_open rates_d1[0][1];
          
    yesterday_high rates_d1[1][3];
          
    yesterday_low rates_d1[1][2];
          
    prev_day cur_day;
          }

    //---- Calculate Standard Pivots
       
    if(Show_Standard_Pivots == 1)   
       {
          
    sp = (yesterday_high+yesterday_low+yesterday_close+today_open)/4;
            
    sr1 = (2*sp)-yesterday_low;
            
    ss1 = (2*sp)-yesterday_high;
            
    sr2 sp+(yesterday_high-yesterday_low);
            
    ss2 sp-(yesterday_high+yesterday_low);
            
    sr3 = (2*sp)-yesterday_low-yesterday_low+yesterday_high;
            
    ss3 = (2*sp)-yesterday_high-yesterday_high+yesterday_low;    

    //---- Set standard pivot line labels on chart window 

          
    if(ObjectFind("SR1 label") != 0)
          {
             
    ObjectCreate("SR1 label"OBJ_TEXT0Time[20], sr1);
             
    ObjectSetText("SR1 label""R1 "+DoubleToStr(sr1,4), 8"Arial"White);
          }
          else
          {
             
    ObjectSetText("SR1 label""R1 "+DoubleToStr(sr1,4), 8"Arial"White);
             
    ObjectMove("SR1 label"0Time[20], sr1);
          }
       
          if(
    ObjectFind("SR2 label") != 0)
          {
             
    ObjectCreate("SR2 label"OBJ_TEXT0Time[20], sr2);
             
    ObjectSetText("SR2 label""R2 "+DoubleToStr(sr2,4), 8"Arial"White);
          }
          else
          {
             
    ObjectSetText("SR2 label""R2 "+DoubleToStr(sr2,4), 8"Arial"White);
             
    ObjectMove("SR2 label"0Time[20], sr2);
          }
          
          if(
    ObjectFind("SR3 label") != 0)
          {
             
    ObjectCreate("SR3 label"OBJ_TEXT0Time[20], sr3);
             
    ObjectSetText("SR3 label""R3 "+DoubleToStr(sr3,4), 8"Arial"White);
          }
          else
          {
             
    ObjectSetText("SR3 label""R3 "+DoubleToStr(sr3,4), 8"Arial"White);
             
    ObjectMove("SR3 label"0Time[20], sr3);
          }
          
          if(
    ObjectFind("SP label") != 0)
          {
             
    ObjectCreate("SP label"OBJ_TEXT0Time[20], sp);
             
    ObjectSetText("SP label""Pivot "+DoubleToStr(sp,4), 8"Arial"White);
          }
          else
          {
             
    ObjectSetText("SP label""Pivot "+DoubleToStr(sp,4), 8"Arial"White);
             
    ObjectMove("SP label"0Time[20], sp);
          }
       
          if(
    ObjectFind("SS1 label") != 0)
          {
             
    ObjectCreate("SS1 label"OBJ_TEXT0Time[20], ss1);
             
    ObjectSetText("SS1 label""S1 "+DoubleToStr(ss1,4), 8"Arial"White);
          }
          else
          {
             
    ObjectSetText("SS1 label""S1 "+DoubleToStr(ss1,4), 8"Arial"White);
             
    ObjectMove("SS1 label"0Time[20], ss1);
          }
       
          if(
    ObjectFind("SS2 label") != 0)
          {
             
    ObjectCreate("SS2 label"OBJ_TEXT0Time[20], ss2);
             
    ObjectSetText("S2 label""S2 "+DoubleToStr(ss2,4), 8"Arial"White);
          }
          else
          {
             
    ObjectSetText("SS2 label""S2 "+DoubleToStr(ss2,4), 8"Arial"White);
             
    ObjectMove("SS2 label"0Time[20], ss2);
          }
       
          if(
    ObjectFind("SS3 label") != 0)
          {
             
    ObjectCreate("SS3 label"OBJ_TEXT0Time[20], ss3);
             
    ObjectSetText("SS3 label""S3 "+DoubleToStr(ss3,4), 8"Arial"White);
          }
          else
          {
             
    ObjectSetText("SS3 label""S3 "+DoubleToStr(ss3,4), 8"Arial"White);
             
    ObjectMove("SS3 label"0Time[20], ss3);
          }
          
    //---- Set standard pivot lines on chart window    
       
          
    if(ObjectFind("SS1 line") != 0)
          {
             
    ObjectCreate("SS1 line"OBJ_HLINE0Time[40], ss1);
             
    ObjectSet("SS1 line"OBJPROP_STYLESTYLE_DASHDOTDOT);
             
    ObjectSet("SS1 line"OBJPROP_COLORLimeGreen);
          }
          else
          {
             
    ObjectMove("SS1 line"0Time[40], ss1);
          }
       
          if(
    ObjectFind("SS2 line") != 0)
          {
             
    ObjectCreate("SS2 line"OBJ_HLINE0Time[40], ss2);
             
    ObjectSet("SS2 line"OBJPROP_STYLESTYLE_DASHDOTDOT);
             
    ObjectSet("SS2 line"OBJPROP_COLORLimeGreen);
          }
          else
          {
             
    ObjectMove("SS2 line"0Time[40], ss2);
          }
       
          if(
    ObjectFind("SS3 line") != 0)
          {
             
    ObjectCreate("SS3 line"OBJ_HLINE0Time[40], ss3);
             
    ObjectSet("SS3 line"OBJPROP_STYLESTYLE_DASHDOTDOT);
             
    ObjectSet("SS3 line"OBJPROP_COLORLimeGreen);
          }
          else
          {
             
    ObjectMove("SS3 line"0Time[40], ss3);
          }
       
          if(
    ObjectFind("SP line") != 0)
          {
             
    ObjectCreate("SP line"OBJ_HLINE0Time[40], sp);
             
    ObjectSet("SP line"OBJPROP_STYLESTYLE_DASHDOTDOT);
             
    ObjectSet("SP line"OBJPROP_COLORMagenta);
          }
          else
          {
             
    ObjectMove("SP line"0Time[40], sp);
          }
       
          if(
    ObjectFind("SR1 line") != 0)
          {
             
    ObjectCreate("SR1 line"OBJ_HLINE0Time[40], sr1);
             
    ObjectSet("SR1 line"OBJPROP_STYLESTYLE_DASHDOTDOT);
             
    ObjectSet("SR1 line"OBJPROP_COLOROrangeRed);
          }
          else
          {
             
    ObjectMove("SR1 line"0Time[40], sr1);
          }
       
          if(
    ObjectFind("SR2 line") != 0)
          {
             
    ObjectCreate("SR2 line"OBJ_HLINE0Time[40], sr2);
             
    ObjectSet("SR2 line"OBJPROP_STYLESTYLE_DASHDOTDOT);
             
    ObjectSet("SR2 line"OBJPROP_COLOROrangeRed);
          }
          else
          {
             
    ObjectMove("SR2 line"0Time[40], sr2);
          }
          
          if(
    ObjectFind("SR3 line") != 0)
          {
             
    ObjectCreate("SR3 line"OBJ_HLINE0Time[40], sr3);
             
    ObjectSet("SR3 line"OBJPROP_STYLESTYLE_DASHDOTDOT);
             
    ObjectSet("SR3 line"OBJPROP_COLOROrangeRed);
          }
          else
          {
             
    ObjectMove("SR3 line"0Time[40], sr3);
          }
       }
    //---- End Of standard pivots      
    //----------------------------------------------------------------------------------------------      
    //---- Calculate Woody Pivots
       
    if(Show_Woodies_Pivots == 1)
       {
          
    = (yesterday_high yesterday_low today_open today_open) / 4;// Woodies Pivot
           
    r1 = (2*p)-yesterday_low;
           
    s1 = (2*p)-yesterday_high;
           
    r2 p+(yesterday_high yesterday_low);
           
    s2 p-(yesterday_high yesterday_low);
     
    //---- Set Woody pivot line labels on chart window 

          
    if(ObjectFind("R1 label") != 0)
          {
             
    ObjectCreate("R1 label"OBJ_TEXT0Time[20], r1);
             
    ObjectSetText("R1 label""Woodies R1 "+DoubleToStr(r1,4), 8"Arial"White);
          }
          else
          {
             
    ObjectSetText("R1 label""Woodies R1 "+DoubleToStr(r1,4), 8"Arial"White);
             
    ObjectMove("R1 label"0Time[20], r1);
          }
       
          if(
    ObjectFind("R2 label") != 0)
          {
             
    ObjectCreate("R2 label"OBJ_TEXT0Time[20], r2);
             
    ObjectSetText("R2 label""Woodies R2 "+DoubleToStr(r2,4), 8"Arial"White);
          }
          else
          {
             
    ObjectSetText("R2 label""Woodies R2 "+DoubleToStr(r2,4), 8"Arial"White);
             
    ObjectMove("R2 label"0Time[20], r2);
          }
          
          if(
    ObjectFind("P label") != 0)
          {
             
    ObjectCreate("P label"OBJ_TEXT0Time[20], p);
             
    ObjectSetText("P label""Woodies Pivot "+DoubleToStr(p,4), 8"Arial"White);
          }
          else
          {
             
    ObjectSetText("P label""Woodies Pivot "+DoubleToStr(p,4), 8"Arial"White);
             
    ObjectMove("P label"0Time[20], p);
          }
       
          if(
    ObjectFind("S1 label") != 0)
          {
             
    ObjectCreate("S1 label"OBJ_TEXT0Time[20], s1);
             
    ObjectSetText("S1 label""Woodies S1 "+DoubleToStr(s1,4), 8"Arial"White);
          }
          else
          {
             
    ObjectSetText("S1 label""Woodies S1 "+DoubleToStr(s1,4), 8"Arial"White);
             
    ObjectMove("S1 label"0Time[20], s1);
          }
       
          if(
    ObjectFind("S2 label") != 0)
          {
             
    ObjectCreate("S2 label"OBJ_TEXT0Time[20], s2);
             
    ObjectSetText("S2 label""Woodies S2 "+DoubleToStr(s2,4), 8"Arial"White);
          }
          else
          {
             
    ObjectSetText("S2 label""Woodies S2 "+DoubleToStr(s2,4), 8"Arial"White);
             
    ObjectMove("S2 label"0Time[20], s2);
          }     
       
    //---- Set Woody pivot lines on chart window    
       
          
    if(ObjectFind("S1 line") != 0)
          {
             
    ObjectCreate("S1 line"OBJ_HLINE0Time[40], s1);
             
    ObjectSet("S1 line"OBJPROP_STYLESTYLE_DASHDOTDOT);
             
    ObjectSet("S1 line"OBJPROP_COLORLimeGreen);
          }
          else
          {
             
    ObjectMove("S1 line"0Time[40], s1);
          }
       
          if(
    ObjectFind("S2 line") != 0)
          {
             
    ObjectCreate("S2 line"OBJ_HLINE0Time[40], s2);
             
    ObjectSet("S2 line"OBJPROP_STYLESTYLE_DASHDOTDOT);
             
    ObjectSet("S2 line"OBJPROP_COLORLimeGreen);
          }
          else
          {
             
    ObjectMove("S2 line"0Time[40], s2);
          }
       
          if(
    ObjectFind("P line") != 0)
          {
             
    ObjectCreate("P line"OBJ_HLINE0Time[40], p);
             
    ObjectSet("P line"OBJPROP_STYLESTYLE_DASHDOTDOT);
             
    ObjectSet("P line"OBJPROP_COLORMagenta);
          }
          else
          {
             
    ObjectMove("P line"0Time[40], p);
          }
       
          if(
    ObjectFind("R1 line") != 0)
          {
             
    ObjectCreate("R1 line"OBJ_HLINE0Time[40], r1);
             
    ObjectSet("R1 line"OBJPROP_STYLESTYLE_DASHDOTDOT);
             
    ObjectSet("R1 line"OBJPROP_COLOROrangeRed);
          }
          else
          {
             
    ObjectMove("R1 line"0Time[40], r1);
          }
       
          if(
    ObjectFind("R2 line") != 0)
          {
             
    ObjectCreate("R2 line"OBJ_HLINE0Time[40], r2);
             
    ObjectSet("R2 line"OBJPROP_STYLESTYLE_DASHDOTDOT);
             
    ObjectSet("R2 line"OBJPROP_COLOROrangeRed);
          }
          else
          {
             
    ObjectMove("R2 line"0Time[40], r2);
          }
       }
    //---- End Of Woodies Pivots
    //--------------------------------------------------------------------------------------------- 
    //---- Calculate & Display Camarilla Equation Pivots 

       
    if(Show_Camarilla_Pivots == 1)
       {
    //---- To display all 8 Camarilla pivots remove comment symbols and
    //     add the appropriate object functions below 
       
       //    ch1 = ((yesterday_high - yesterday_low) * D1) + yesterday_close;
       //    ch2 = ((yesterday_high - yesterday_low) * D2) + yesterday_close;
           
    ch3 = ((yesterday_high yesterday_low)* D3) + yesterday_close;
           
    ch4 = ((yesterday_high yesterday_low)* D4) + yesterday_close;
       
    //    cl1 = yesterday_close - ((yesterday_high - yesterday_low)*(D1));
       //    cl2 = yesterday_close - ((yesterday_high - yesterday_low)*(D2));
           
    cl3 yesterday_close - ((yesterday_high yesterday_low)*(D3));
           
    cl4 yesterday_close - ((yesterday_high yesterday_low)*(D4));
     
    //---- Set Camarilla pivots line labels on chart window 

          
    if(ObjectFind("CH3") != 0)
          {
             
    ObjectCreate("CH3"OBJ_TEXT0Time[35], ch3);
             
    ObjectSetText("CH3","Camarilla H3 "+DoubleToStr(ch3,4) , 8"Arial"White);
          }
          else
          {
             
    ObjectSetText("CH3","Camarilla H3 "+DoubleToStr(ch3,4) , 8"Arial"White);
             
    ObjectMove("CH3"0Time[35], ch3);
          }
       
          if(
    ObjectFind("CH4") != 0)
          {
             
    ObjectCreate("CH4"OBJ_TEXT0Time[35], ch4);
             
    ObjectSetText("CH4""Camarilla H4 "+DoubleToStr(ch4,4), 8"Arial"White);
          }
          else
          {
             
    ObjectSetText("CH4""Camarilla H4 "+DoubleToStr(ch4,4), 8"Arial"White);
             
    ObjectMove("CH4"0Time[35], ch4);
          }
       
          if(
    ObjectFind("CL3") != 0)
          {
             
    ObjectCreate("CL3"OBJ_TEXT0Time[35], cl3);
             
    ObjectSetText("CL3""Camarilla L3 "+DoubleToStr(cl3,4), 8"Arial"White);
          }
          else
          {
             
    ObjectSetText("CL3""Camarilla L3 "+DoubleToStr(cl3,4), 8"Arial"White);
             
    ObjectMove("CL3"0Time[35 ], cl3);
          }
          
          if(
    ObjectFind("CL4") != 0)
          {
             
    ObjectCreate("CL4"OBJ_TEXT0Time35], cl4);
             
    ObjectSetText("CL4""Camarilla L4 "+DoubleToStr(cl4,4), 8"Arial"White);
          }
          else
          {
             
    ObjectSetText("CL4""Camarilla L4 "+DoubleToStr(cl4,4), 8"Arial"White);
             
    ObjectMove("CL4"0Time[35], cl4);
          }
       
    //---- Set Camarilla pivots lines on chart window    
       
          
    if(ObjectFind("CH3line") != 0)
          {
             
    ObjectCreate("CH3line"OBJ_HLINE0Time[40], ch3);
             
    ObjectSet("CH3line"OBJPROP_STYLESTYLE_DOT);
             
    ObjectSet("CH3line"OBJPROP_COLORRed);
          }
          else
          {
             
    ObjectMove("CH3line"0Time[40], ch3);
          }
       
          if(
    ObjectFind("CH4line") != 0)
          {
             
    ObjectCreate("CH4line"OBJ_HLINE0Time[40], ch4);
             
    ObjectSet("CH4line"OBJPROP_STYLESTYLE_DOT);
             
    ObjectSet("CH4line"OBJPROP_COLORDodgerBlue);
          }
          else
          {
             
    ObjectMove("CH4line"0Time[40], ch4);
          }
       
          if(
    ObjectFind("CL3line") != 0)
          {
             
    ObjectCreate("CL3line"OBJ_HLINE0Time[40], cl3);
             
    ObjectSet("CL3line"OBJPROP_STYLESTYLE_DOT);
             
    ObjectSet("CL3line"OBJPROP_COLORRed);
          }
          else
          {
             
    ObjectMove("CL3line"0Time[40], cl3);
          }
       
          if(
    ObjectFind("CL4line") != 0)
          {
             
    ObjectCreate("CL4line"OBJ_HLINE0Time[40], cl4);
             
    ObjectSet("CL4line"OBJPROP_STYLESTYLE_DOT);
             
    ObjectSet("CL4line"OBJPROP_COLORDodgerBlue);
          }
          else
          {
             
    ObjectMove("CL4line"0Time[40], cl4);
          }
       }
    //---- End Of Camarilla Pivots
    //----------------------------------------------------------------------------------------------
    //---- Calculate DeMark Pivots (Projected Daily High & Low)
       
    if(Show_Demark_Pivots == 1)
       {
           if(
    yesterday_close yesterday_open)
           {
               
    = (yesterday_high + (2yesterday_low) + yesterday_close);
           }
           if(
    yesterday_close yesterday_open)
           {
               
    = ((yesterday_high*2)    + yesterday_low    yesterday_close);
           }
           if(
    yesterday_close == yesterday_open)
           {
               
    = (yesterday_high yesterday_low + (2yesterday_close));
           }    
        
           
    dr = (x/yesterday_low); //projected high
           
    ds = (x/yesterday_high); //projected low
     
    //---- Set DeMark pivots line labels on chart window 

          
    if(ObjectFind("DS Label") != 0)
          {
             
    ObjectCreate("DS Label"OBJ_TEXT0Time[55], ds);
             
    ObjectSetText("DS Label""DeMark Projected Low "+DoubleToStr(ds,4), 8"Arial"White);
          }
          else
          {
             
    ObjectSetText("DS Label""DeMark Projected Low "+DoubleToStr(ds,4), 8"Arial"White);
             
    ObjectMove("DS Label"0Time[55], ds);
          }
       
          if(
    ObjectFind("DR Label") != 0)
          {
             
    ObjectCreate("DR Label"OBJ_TEXT0Time[55], dr);
             
    ObjectSetText("DR Label""DeMark Projected High "+DoubleToStr(dr,4), 8"Arial"White);
          }
          else
          {
             
    ObjectSetText("DR Label""DeMark Projected High "+DoubleToStr(dr,4), 8"Arial"White);
             
    ObjectMove("DR Label"0Time[55], dr);
          }
        
    //---- Set DeMark pivots lines on chart window    
       
          
    if(ObjectFind("DS Line") != 0)
          {
             
    ObjectCreate("DS Line"OBJ_HLINE0Time[50], ds);
             
    ObjectSet("DS Line"OBJPROP_STYLESTYLE_DASHDOT);
             
    ObjectSet("DS Line"OBJPROP_COLORRed);
          }
          else
          {
             
    ObjectMove("DS Line"0Time[50], ds);
          }
       
          if(
    ObjectFind("DR Line") != 0)
          {
             
    ObjectCreate("DR Line"OBJ_HLINE0Time[50], dr);
             
    ObjectSet("DR Line"OBJPROP_STYLESTYLE_DASHDOT);
             
    ObjectSet("DR Line"OBJPROP_COLORLime);
          }
          else
          {
             
    ObjectMove("DR Line"0Time[50], dr);
          } 
       }
    //---- End Of Demark Pivots
    //----------------------------------------------------------------------------------------------    
    //---- Done
     
    }
    //+------------------------------------------------------------------+ 
    الملفات المرفقة الملفات المرفقة

  8. #8393
    الصورة الرمزية zied78
    zied78 غير متواجد حالياً عضو المتداول العربي
    تاريخ التسجيل
    Jul 2017
    الإقامة
    تونس
    المشاركات
    33

    افتراضي تعديل على اي مؤشر له متغيرات خارجية

    اهلا بلاساتذة الكرام
    اود معرفة الطريقة لتعديل على اي مؤشر له متغيرات خارجية خاصة بتغيير الالوان ووضعها في الخانة المنفصلة لتغيير اللون وان امكن ايضا معرفة نفس العملية ان كان المؤشر لا تضهر فيه المتغيرات الخارجية وكيفية اضهارها مع ادراجها في الخانة المنفصلة المذكورة لتعم الفائدة على الجميع قد ادرجت مثالين وهما مؤشر fibo independance و multi pivots وفق الله الجميع

    اضغط على الصورة لعرض أكبر

الاســـم:	fibo independance edit.jpg
المشاهدات:	41
الحجـــم:	155.3 كيلوبايت
الرقم:	470400
    اضغط على الصورة لعرض أكبر

الاســـم:	Multi pivots edit.jpg
المشاهدات:	41
الحجـــم:	155.7 كيلوبايت
الرقم:	470401
    الملفات المرفقة الملفات المرفقة

  9. #8394
    الصورة الرمزية ali_shadi
    ali_shadi غير متواجد حالياً عضو المتداول العربي
    تاريخ التسجيل
    Apr 2016
    الإقامة
    السويد
    العمر
    28
    المشاركات
    367

    افتراضي

    اخي اسامة السلام عليكم

    معلومة لو سمحت اخي الغالي

    اريد ان اقارن قيمة معينة x في مؤشر ما ... كيف اجعله يقارن هذه القيمة ليس باللو ، الهاي ، الاوبن او الكلوز وانما بكل القيم التي مر عليها السعر داخل فترة معينة أي كل تكة في فترة مضت جربت MODE_TICKVALUE
    ولكنها لم تشتغل
    جزاك الله كل خير اخي

  10. #8395
    الصورة الرمزية MR.dollar
    MR.dollar غير متواجد حالياً مشرف المتداول العربي
    تاريخ التسجيل
    Jun 2009
    الإقامة
    مصر
    المشاركات
    13,851

    افتراضي

    اقتباس المشاركة الأصلية كتبت بواسطة ali_shadi مشاهدة المشاركة
    اخي اسامة السلام عليكم

    معلومة لو سمحت اخي الغالي

    اريد ان اقارن قيمة معينة x في مؤشر ما ... كيف اجعله يقارن هذه القيمة ليس باللو ، الهاي ، الاوبن او الكلوز وانما بكل القيم التي مر عليها السعر داخل فترة معينة أي كل تكة في فترة مضت جربت MODE_TICKVALUE
    ولكنها لم تشتغل
    جزاك الله كل خير اخي
    وعليكم السلام ورحمة الله وبركاته
    في الميتاتريدر الTICK لا تكون محفوظه في البيانات التاريخيه بالتالي لا يمكن ذلك
    توقيع العضو
    بناء أنظمة تداول آلي ويدوي لفحص سوق العملات ودمجها مع التحليل الفني لإتخاذ القرارات

  11. #8396
    الصورة الرمزية MR.dollar
    MR.dollar غير متواجد حالياً مشرف المتداول العربي
    تاريخ التسجيل
    Jun 2009
    الإقامة
    مصر
    المشاركات
    13,851

    افتراضي

    اقتباس المشاركة الأصلية كتبت بواسطة zied78 مشاهدة المشاركة
    اهلا بلاساتذة الكرام
    اود معرفة الطريقة لتعديل على اي مؤشر له متغيرات خارجية خاصة بتغيير الالوان ووضعها في الخانة المنفصلة لتغيير اللون وان امكن ايضا معرفة نفس العملية ان كان المؤشر لا تضهر فيه المتغيرات الخارجية وكيفية اضهارها مع ادراجها في الخانة المنفصلة المذكورة لتعم الفائدة على الجميع قد ادرجت مثالين وهما مؤشر fibo independance و multi pivots وفق الله الجميع

    اضغط على الصورة لعرض أكبر

الاســـم:	fibo independance edit.jpg
المشاهدات:	41
الحجـــم:	155.3 كيلوبايت
الرقم:	470400
    اضغط على الصورة لعرض أكبر

الاســـم:	Multi pivots edit.jpg
المشاهدات:	41
الحجـــم:	155.7 كيلوبايت
الرقم:	470401
    لا يوجد قاعده عامه لكن ستختلف من مؤشر لآخر وحسب طريقة كتابة الكود
    المؤشرات التي تكون الألوان موجود في نافذة color هي التي تعتمد على الindex في رسم الخطوط
    أما المؤشرات التي تكون الألوان موجوده من ضمن الإعدادات فهي التي تعتمد على الobjects في رسم الخطوط
    توقيع العضو
    بناء أنظمة تداول آلي ويدوي لفحص سوق العملات ودمجها مع التحليل الفني لإتخاذ القرارات

  12. #8397
    الصورة الرمزية zied78
    zied78 غير متواجد حالياً عضو المتداول العربي
    تاريخ التسجيل
    Jul 2017
    الإقامة
    تونس
    المشاركات
    33

    افتراضي

    شكرا استاذي الكريم على الاجابة
    تحياتي

  13. #8398
    الصورة الرمزية ali_shadi
    ali_shadi غير متواجد حالياً عضو المتداول العربي
    تاريخ التسجيل
    Apr 2016
    الإقامة
    السويد
    العمر
    28
    المشاركات
    367

    افتراضي

    اقتباس المشاركة الأصلية كتبت بواسطة MR.dollar مشاهدة المشاركة
    وعليكم السلام ورحمة الله وبركاته
    في الميتاتريدر الTICK لا تكون محفوظه في البيانات التاريخيه بالتالي لا يمكن ذلك

    طيب اخي الكريم الا توجد حيلة لفعل دلك

  14. #8399
    الصورة الرمزية MR.dollar
    MR.dollar غير متواجد حالياً مشرف المتداول العربي
    تاريخ التسجيل
    Jun 2009
    الإقامة
    مصر
    المشاركات
    13,851

    افتراضي

    اقتباس المشاركة الأصلية كتبت بواسطة ali_shadi مشاهدة المشاركة
    طيب اخي الكريم الا توجد حيلة لفعل دلك
    يمكنك عمل باك تست للمؤشر وإستخدام أحد البرامج التي توفر باك تست بالتيك داتا مثل برنامج tickstory لكنه ليس مجاني
    توقيع العضو
    بناء أنظمة تداول آلي ويدوي لفحص سوق العملات ودمجها مع التحليل الفني لإتخاذ القرارات

  15. #8400
    الصورة الرمزية Forex2017
    Forex2017 غير متواجد حالياً عضو المتداول العربي
    تاريخ التسجيل
    May 2017
    الإقامة
    مصر
    المشاركات
    156

    افتراضي

    كيف ممكن اعرف انني بشمعه جديده ؟
    وجدت هذا الكود
    كود:
    //////////////////////////////////////////////////////////////////<          >
    bool       bNewBar ()                                           //<          >
    {                                                               //<          >
    //                                                              //<          >
    static int iTime_0 = 0                                        ; //<          >
    //                                                              //<          >
    if       ( iTime_0 < iTime ( 0 , 0 , 0 ) )                      //<          >
             { iTime_0 = iTime ( 0 , 0 , 0 ) ; return ( TRUE  ) ; } //<          >
    else     {                                 return ( FALSE ) ; } //<          >
    //                                                              //<          >
    }                                                               //<          >
    //////////////////////////////////////////////////////////////////<          >
    لكن المشكلة عند وضع الاكسبيرت على الشارت يفتح صفقه مباشره ولايتعرف على بدايه شمعه جديده
    مطلوب عند وضع الاكسبيرت على الشارت ينتظر فقد بدايه شمعه جديده لانه الدخول سوف يكون بدايه كل شمعه فقط

المواضيع المتشابهه

  1. موضوع مخصص للاكسبيرتات اللتي يستخدمها الاعضاء على الحقيقي,,عندك اكسبيرت ممتاز ضعه هنا
    By محمد معمو in forum برمجة المؤشرات واكسبرتات التداول - Experts Advisor EA
    مشاركات: 11
    آخر مشاركة: 15-12-2023, 02:03 PM
  2. عااااااااااااجل ( موضوع مخصص للفرص الفورية)!!!
    By عاشق الذبذبـة in forum توقعات وتوصيات سوق العملات
    مشاركات: 280
    آخر مشاركة: 27-08-2009, 10:30 PM

الاوسمة لهذا الموضوع


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17