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

    bykov trend

    admin LV20
    2018-01-18 · 2886 阅读
    XAUUSDM30.png


    1. //+------------------------------------------------------------------+
    2. //| BykovTrend_Sig.mq4
    3. //| Ramdass - Conversion only
    4. //+------------------------------------------------------------------+

    5. #property indicator_chart_window
    6. #property indicator_buffers 2
    7. #property indicator_color1 Magenta
    8. #property indicator_color2 Aqua

    9. //---- input parameters
    10. extern int RISK=3;
    11. extern int SSP=9;
    12. extern int CountBars=500;

    13. //---- buffers
    14. double val1[];
    15. double val2[];

    16. //+------------------------------------------------------------------+
    17. //| Custom indicator initialization function                         |
    18. //+------------------------------------------------------------------+
    19. int init()
    20.   {
    21.    string short_name;
    22. //---- indicator line
    23.    IndicatorBuffers(2);
    24.    SetIndexStyle(0,DRAW_ARROW);
    25.    SetIndexArrow(0,234);
    26.    SetIndexStyle(1,DRAW_ARROW);
    27.    SetIndexArrow(1,233);
    28.    SetIndexBuffer(0,val1);
    29.    SetIndexBuffer(1,val2);

    30. //----
    31.    return(0);
    32.   }
    33. //+------------------------------------------------------------------+
    34. //| BykovTrend_Sig                                                   |
    35. //+------------------------------------------------------------------+
    36. int start()
    37.   {   
    38.    SetIndexDrawBegin(0,Bars-CountBars+SSP+1);
    39.    SetIndexDrawBegin(1,Bars-CountBars+SSP+1);
    40.    int i,counted_bars=IndicatorCounted();
    41.    int K;
    42.    bool uptrend,old;
    43.    double wpr;
    44.    
    45.    K=33-RISK;
    46. //----
    47.    if(Bars<=SSP+1) return(0);
    48. //---- initial zero
    49.    if(counted_bars<SSP+1)
    50.    {
    51.       for(i=1;i<=0;i++) val1[CountBars-i]=0.0;
    52.       for(i=1;i<=0;i++) val2[CountBars-i]=0.0;
    53.    }
    54. //----
    55.    i=CountBars-SSP-1;
    56.    if(counted_bars>=SSP+1) i=CountBars-counted_bars-1;
    57.    while(i>=0)
    58.      {
    59.      
    60.    wpr=iWPR(NULL,0,SSP,i);
    61.    val1[i]=0.0; val2[i]=0.0;
    62.    if (wpr<-100+K) uptrend=false;
    63.    if (wpr>-K) uptrend=true;
    64.    if ((! uptrend==old) && uptrend==true) {val2[i]=Low[i]-5*Point;}
    65.    if ((! uptrend==old) && uptrend==false) {val1[i]=High[i]+5*Point;}
    66.    old=uptrend;
    67.       
    68.       i--;
    69.      }
    70.    return(0);
    71.   }
    72. //+------------------------------------------------------------------+
    复制代码


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

    举报

     

    回答|共 12 个

    愚人码头 LV4

    发表于 2020-6-5 13:52:09 | 显示全部楼层

    支持一下:lol

    叫花子 LV5

    发表于 2020-6-13 21:47:08 | 显示全部楼层

    我是个凑数的。。。

    愚人码头 LV4

    发表于 2020-7-2 11:30:18 | 显示全部楼层

    过来看看的

    谢老大 LV18

    发表于 2020-7-4 15:32:21 | 显示全部楼层

    帮你顶下哈!!

    1毛硬币 LV7

    发表于 2020-7-6 11:54:09 | 显示全部楼层

    谢谢楼主分享

    欢迎你 LV3

    发表于 2020-8-16 20:20:54 | 显示全部楼层

    帮你顶下哈!!

    AD瑞智广告 LV7

    发表于 2020-9-1 21:24:31 | 显示全部楼层

    帮你顶下哈!!

    bxss LV7

    发表于 2020-9-4 16:27:39 | 显示全部楼层

    学习了,不错

    laiwmkoy LV3

    发表于 2020-11-23 21:27:48 | 显示全部楼层

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

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

    微信二维码

    有问题联系客服