同花顺一分线抄底指标公式

 

 MID :  MA(CLOSE,N);

UPPER: MID + P*STD(CLOSE,N);

LOWER: MID - P*STD(CLOSE,N);

UP_TOUCH_UPPER   := CROSS(HIGH,UPPER);

DOWN_TOUCH_MID   := CROSS(MID,LOW);

DOWN_TOUCH_LOWER := CROSS(LOWER,LOW);

DRAWTEXT(UP_TOUCH_UPPER,  HIGH,'U');

DRAWTEXT(DOWN_TOUCH_MID,  HIGH,'M');

DRAWTEXT(DOWN_TOUCH_LOWER,HIGH,'L');

touch = DOWN_TOUCH_MID OR DOWN_TOUCH_LOWER;

IF touch==0 THEN RETURN;

NEAR1_UP_TOUCH_UPPER_POS = 0;

NEAR2_UP_TOUCH_UPPER_POS = 0;

icount = 1;

ilasttouchup = 0;

WHILE (icount <300 )

{

IF ( REF(UP_TOUCH_UPPER,icount) )

{

IF ( NEAR1_UP_TOUCH_UPPER_POS == 0 )

{

NEAR1_UP_TOUCH_UPPER_POS=icount;

}

ELSE

{

//距离必须远点,不然认为是同一个,这个要根据不同的时间单位来调

IF ( icount - ilasttouchup  > 7 )

{

NEAR2_UP_TOUCH_UPPER_POS=icount;

BREAK;

}

}

ilasttouchup = icount;

}

icount = icount +1;

}

//分钟线的条件

C1 =  NEAR2_UP_TOUCH_UPPER_POS > NEAR1_UP_TOUCH_UPPER_POS;

C2 =  NEAR1_UP_TOUCH_UPPER_POS < 20;

C3 =  NEAR2_UP_TOUCH_UPPER_POS - NEAR1_UP_TOUCH_UPPER_POS > 40;

C4 = REF(CLOSE, NEAR1_UP_TOUCH_UPPER_POS) < (REF(CLOSE, NEAR2_UP_TOUCH_UPPER_POS) * 0.99);

IF ( C1 AND C2 AND C3 AND C4)

{

DRAWICON(1,LOW,1);

DRAWTEXT(1,LOW,'BUY');

}

 




来函数检测结果如下
该公式没有未来函数


解密、定制、编写公式指标请联系QQ或微信同号:88652583
置顶指标

相关指标公式

输出 MID : 收盘价的N日简单移动平均
输出UPPER: MID + P*收盘价的N日估算标准差
输出LOWER: MID - P*收盘价的N日估算标准差
赋值: 最高价上穿UPPER
赋值: MID上穿最低价
赋值: LOWER上穿最低价
当满足条件UP_TOUCH_UPPER时,在最高价位置书写文字
当满足条件DOWN_TOUCH_MID时,在最高价位置书写文字
当满足条件DOWN_TOUCH_LOWER时,在最高价位置书写文字
TOUCH = DOWN_TOUCH_MID OR DOWN_TOUCH_LOWER
条件判断 TOUCH 0 THEN RETURN
NEAR1_UP_TOUCH_UPPER_POS = 0
NEAR2_UP_TOUCH_UPPER_POS = 0
ICOUNT = 1
ILASTTOUCHUP = 0
WHILE (ICOUNT <300 )ELSE}ILASTTOUCHUP = ICOUNT
}ICOUNT = ICOUNT +1
}//分钟线的条件C1 = NEAR2_UP_TOUCH_UPPER_POS > NEAR1_UP_TOUCH_UPPER_POS
C2 = NEAR1_UP_TOUCH_UPPER_POS < 20
C3 = NEAR2_UP_TOUCH_UPPER_POS - NEAR1_UP_TOUCH_UPPER_POS > 40
C4 = NEAR1_UP_TOUCH_UPPER_POS日前的收盘价 < (NEAR2_UP_TOUCH_UPPER_POS日前的收盘价 * 0.99)
如果C1ANDC2ANDC3ANDC4,返回?,否则返回?

指标安装下载帮助  |   联系我们  |  乐淘公式网  |  公式网   |  指标公式  |   加入收藏   |  设为主页

@2005-2025 浙ICP备2024071487号-1 乐淘公式网公式网均来源互联网收集整理,如不慎侵犯了你的权益,请联系我们告知,我们将做删除处理
免责声明:乐淘公式网所有指标公式及文章由网络收集,不保障实时性和真实性, 仅供学习研究并不构成投资建议,请勿以此为依据进行股票交易,由此引起的投资亏损与本站无关。
QQ:88652583 微信 88652583
sitemap站点地图