最新公告
  • 欢迎您光临九毛八公式指标网www.9m8.cn,本站全新改版试运行,期间内容全部免费,欢迎下载!欢迎加入本站VIP
  • 熊市操盘线(源码)

    正文概述    2024-04-07 23:58:25  
    sBUY:=CROSS(LOW[1],dn) AND (up-dn)/dn 0.3 AND CLOSE MID AND (CLOSE-CLOSE[1])/CLOSE[1] 0.03 AND IsNowBuy[1]==FALSE; //买入信号
    DRAWICON (sBUY,LOW, buy
    //判断现在是否买入状态
    IF(sBuy==TRUE OR IsNowBuy[1]==TRUE)
    IsNowBuy:=TRUE;
    //
    keep=BARSLAST(sBuy == TRUE); //买入多少天了
    win5=0;win10=0;win15=0;win20=0;Lose3=0;
    CanSell:=CROSS(MA(CLOSE,10),MA(CLOSE,5));
    IF(IsNowBuy==TRUE)
    {
    IF(keep 1)
    {
    pCost = MONEY[keep-1]/VOL[keep-1];
    //5%止盈
    IF(win5[1] != 1 AND HIGH/PCost 1.05 )
    {
    win5=1;
    DRAWICON(1,HIGH, master_sell2 , 5%止盈
    //IsNowBuy=FALSE;
    }
    ELSE
    {
    win5=win5[1];
    }
    //10%止盈
    IF(win10[1] != 1 AND HIGH/PCost 1.1 )
    {
    win10=1;
    DRAWICON(1,HIGH, master_sell4 , 10%止盈
    //IsNowBuy=FALSE;
    }
    ELSE
    {
    win10=win10[1];
    }
    //15%止盈
    IF(win15[1] != 1 AND HIGH/PCost 1.15 )
    {
    win15=1;
    DRAWICON(1,HIGH, master_sell5 , 15%止盈
    //IsNowBuy=FALSE;
    }
    ELSE
    {
    win15=win15[1];
    }
    //5%止损
    IF(Lose3[1] != 1 AND (pCost-CLOSE)/PCost 0.05)
    {
    Lose3=1;
    DRAWICON(1,HIGH, master_sell3 , 5%止损
    IsNowBuy=FALSE;
    }
    ELSE
    {
    Lose3=Lose3[1];
    }
    //卖出
    IF(CanSell==TRUE)
    {
    DRAWICON(1,HIGH, master_sell1 , 均线卖出
    IsNowBuy=FALSE;
    }
    }
    }


    九毛八公式指标,一个优质的公式指标平台!
    九毛八公式指标 » 熊市操盘线(源码) 加入收藏