• 注册
  • 靓号站
    • 中文
    • English
  • 注册
  • 对冲 对冲 关注:0 内容:2819

    Show Spread

  • 查看作者
  • 打赏作者
  • 对冲
  • Lv.9
    神隐会员
    靓号:1322336
    EA+

    Show Spread

      //+——— ——— ——— ——— ——— ——— ——— —+
      //| Magnified Market Price.mq4        ver1.4             by Habeeb   |
      //+——— ——— ——— ——— ——— ——— ——— —+
      #property indicator_chart_window
      //—-
        extern string note1=”Change font colors automatically? True = Yes”;
      //  extern bool   Bid_Ask_Colors= True;
        extern string note2=”Default Font Color”;
        extern color  FontColor=DarkViolet;
        extern string note3=”Font Size”;
        extern int    FontSize=24;
        extern string note4=”Font Type”;
        extern string FontType=”Arial Black”;
        extern string note5=”Display the spread in what corner?”;
        extern string note6=”Upper left=0; Upper right=1″;
        extern string note7=”Lower left=2; Lower right=3″;
        extern int    WhatCorner=1;
        double div=1;
        int    precision=0;
      //—-
        double        Old_Price;
      //+——— ——— ——— ——— ——— ——— ——— —+
      //|                                                                  |
      //+——— ——— ——— ——— ——— ——— ——— —+
      int init()
        {
        int myDigits=MarketInfo(Symbol(),MODE_DIGITS);
        if(myDigits==3) div=10;
        if(myDigits==5) div=10;
         return(0);
        }
      //+——— ——— ——— ——— ——— ——— ——— —+
      //|                                                                  |
      //+——— ——— ——— ——— ——— ——— ——— —+
      int deinit()
        {
         ObjectDelete(“Market_Price_ Label2”);
      //—-
         return(0);
        }
      //+——— ——— ——— ——— ——— ——— ——— —+
      //|                                                                  |
      //+——— ——— ——— ——— ——— ——— ——— —+
      int start()
        {
         double spread = MarketInfo(Symbol( ), MODE_SPREAD) / div;
         //Comment(“Current spread: “,spread);
          /* if (Bid_Ask_Colors= =True)
           {
            if (Bid > Old_Price) FontColor=LawnGreen ;
            if (Bid < Old_Price) FontColor=Red;
            Old_Price=Bid;
           }
           */
      //—-  
         ObjectCreate(“Market_Price_ Label2”, OBJ_LABEL, 0,0,0);
         ObjectSetText(“Market_Price_ Label2”, DoubleToStr(spread,1), FontSize, FontType, FontColor);
         ObjectSet(“Market_Price_ Label2”, OBJPROP_CORNER, WhatCorner);
         ObjectSet(“Market_Price_ Label2”, OBJPROP_XDISTANCE, 1);
         ObjectSet(“Market_Price_ Label2”, OBJPROP_YDISTANCE, 1);
        }
      //+——— ——— ——— ——— ——— ——— ——— —+
                 
         
        

    复制代码

    Show Spread.mq4
    2.51 KB,下载次数:0,下载积分:活跃 -2,售价:10 金币[记录]
    暂无描述

    请登录之后再进行评论

    登录

    WordPress后台-外观-小工具 进行配置小工具

  • 发布
  • 做任务
  • 实时动态
  • 偏好设置
  • 帖子间隔 侧栏位置: