📅 财经日历 📊 实时波动 📈 大盘云图 📶 行情走势 🆚 投机情绪 🚀 今日热点

    YTG DveMashki

    2016-05-19 · 4541 阅读


    ytg-dve-mashki.png


    1. //+------------------------------------------------------------------+
    2. //|                                            ytg_DveMashki_ind.mq4 |
    3. //|                                                     Yuriy Tokman |
    4. //|                                            yuriytokman@gmail.com |
    5. //+------------------------------------------------------------------+
    6. #property copyright "Yuriy Tokman"
    7. #property link      "yuriytokman@gmail.com"

    8. #property indicator_chart_window
    9. #property indicator_buffers 2
    10. #property indicator_color1 Lime
    11. #property indicator_color2 Red
    12. #property indicator_width1 6
    13. #property indicator_width2 6
    14. //----
    15. extern color color1 = Lime;
    16. extern color color2 = Red;
    17. extern int ma_1 = 25;
    18. extern int ma_2 = 50;
    19. extern int method = 0;
    20. extern int price = 0;
    21. //---- buffers
    22. double ExtMapBuffer1[];
    23. double ExtMapBuffer2[];
    24. //----
    25. int ExtCountedBars=0;
    26. //\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
    27. int init()
    28.   {
    29.   string char[256]; int i;
    30.   for (i = 0; i < 256; i++) char[i] = CharToStr(i);
    31.   string txt =  
    32.   char[121]+char[117]+char[114]+char[105]+char[121]+char[116]+char[111]
    33.   +char[107]+char[109]+char[97]+char[110]+char[64]+char[103]+char[109]
    34.   +char[97]+char[105]+char[108]+char[46]+char[99]+char[111]+char[109];
    35. //---- indicators
    36.    SetIndexStyle(0,DRAW_HISTOGRAM, 0, 6, color1);
    37.    SetIndexBuffer(0, ExtMapBuffer1);
    38.    SetIndexStyle(1,DRAW_HISTOGRAM, 0, 6, color2);
    39.    SetIndexBuffer(1, ExtMapBuffer2);
    40.    IndicatorShortName(txt);
    41.    SetIndexLabel(0,txt);
    42.    SetIndexLabel(1,txt);   
    43. //----
    44.    SetIndexDrawBegin(0,10);
    45.    SetIndexDrawBegin(1,10);
    46. //---- indicator buffers mapping
    47.    SetIndexBuffer(0,ExtMapBuffer1);
    48.    SetIndexBuffer(1,ExtMapBuffer2);
    49.      
    50. Comment("\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n  "+txt);

    51.    return(0);
    52.   }
    53. //\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
    54. int start()
    55.   {
    56.    if(Bars<=10) return(0);
    57.    ExtCountedBars=IndicatorCounted();
    58. //---- check for possible errors
    59.    if (ExtCountedBars<0) return(-1);
    60. //---- last counted bar will be recounted
    61.    if (ExtCountedBars>0) ExtCountedBars--;
    62.    int pos=Bars-ExtCountedBars-1;
    63.    while(pos>=0)
    64.      {
    65.       ExtMapBuffer1[pos]=iMA(Symbol(),0,ma_1,0,method,price,pos);
    66.       ExtMapBuffer2[pos]=iMA(Symbol(),0,ma_2,0,method,price,pos);
    67.            pos--;
    68.      }
    69. //----
    70.    return(0);
    71.   }
    72. //\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
    复制代码



    ytg_DveMashki_ind.mq4
    ""
    还没有人打赏,支持一下
    回复

    举报

     

    回答|共 10 个

    aishang LV10

    发表于 2018-9-9 09:00:00 | 显示全部楼层

    LZ说的很不错

    jsnjhz LV0

    发表于 2019-3-13 11:55:42 | 显示全部楼层

    打不开\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
    复制代码

    jaryk LV18

    发表于 2019-3-13 12:48:53 | 显示全部楼层

    感谢分享!!!!

    365 LV3

    发表于 2020-6-10 13:31:12 | 显示全部楼层

    小手一抖,积分到手!

    外汇博客 LV7

    发表于 2020-7-8 17:39:07 | 显示全部楼层

    谢谢楼主分享

    zjn1688 LV3

    发表于 2020-8-22 16:35:53 | 显示全部楼层

    帮你顶下哈!!

    avril LV5

    发表于 2020-8-25 15:44:46 | 显示全部楼层

    帮你顶下哈!!

    小女人COCO LV4

    发表于 2021-7-7 11:38:13 | 显示全部楼层

    支持下

    蚂蚁上树 LV1

    发表于 2026-3-11 18:32:16 | 显示全部楼层

    12下一页
    您需要登录后才可以回帖 登录 | 注册

    提醒: 禁止引战、谩骂、灌水内容

    微信二维码

    有问题联系客服