去评论
彩虹桥投资充电站

【指标学习】冲天龙头趋势通道指标:如何帮你抓住日内T0机会

最爱主升浪
2025/01/16 20:43:37
在股票市场中,技术分析是投资者不可或缺的工具之一。通过技术指标可以更好地理解市场趋势、价格波动以及潜在的买卖机会。

一、指标的基本构成

通达信冲天龙头指标由多个子指标和条件判断组成,主要包括以下几个部分:


二、指标的核心功能

三、指标的实际应用



龙头通道源代码通达信:
通道:(WMA(WMA(HIGH,25),25)-WMA(WMA(LOW,25),25))*1+WMA(WMA(HIGH,25),25),DOTLINE,COLORYELLOW;龙头:WMA(WMA(LOW,25),25)-(WMA(WMA(HIGH,25),25)-WMA(WMA(LOW,25),25))*1,COLORRED,LINETHICK2;通道2:EMA(龙头,25),COLORCYAN,LINETHICK2;DRAWBAND(龙头,RGB(55,0,0),通道2,RGB(0,91,0));DRAWKLINE(HIGH,OPEN,LOW,CLOSE);STICKLINE(龙头>LOW AND 龙头< HIGH,龙头,MIN(MIN(OPEN,CLOSE),龙头),3,0),COLORBLUE;STICKLINE(龙头>MIN(CLOSE,OPEN) AND 龙头< MAX(CLOSE,OPEN),龙头,MIN(OPEN,CLOSE),0,0),COLORBLUE;STICKLINE(龙头>HIGH,OPEN,CLOSE,3,0),COLORBLUE;STICKLINE(龙头>HIGH,HIGH,LOW,0,0),COLORBLUE;STICKLINE(NOT(龙头>HIGH),OPEN,CLOSE,3,0),COLORRED;STICKLINE(NOT(龙头>HIGH),HIGH,LOW,0,0),COLORRED;lijin4:=100*WMA(WMA(CLOSE-REF(CLOSE,1),6),6)/WMA(WMA(ABS(CLOSE-REF(CLOSE,1)),6),6);lijin5:=LLV(lijin4,2)=LLV(lijin4,7) AND COUNT(lijin4< 0,2) AND CROSS(lijin4,MA(lijin4,2));lijin6:=龙头>HIGH AND lijin5 AND LOW<=龙头 AND CLOSE!=LOW;lijin7:=(HIGH+LOW+CLOSE)/3;lijin8:=VOL/IF(HIGH=LOW,4,HIGH-LOW);lijin9:=IF(CAPITAL=0,lijin8*(lijin7-MIN(CLOSE,OPEN)),lijin8*IF(HIGH=LOW,1,MIN(OPEN,CLOSE)-LOW));lijin10:=IF(CAPITAL=0,lijin8*(MIN(OPEN,CLOSE)-LOW),lijin8*IF(HIGH=LOW,1,lijin7-MIN(CLOSE,OPEN)));lijin11:=IF(CAPITAL=0,lijin8*(HIGH-MAX(OPEN,CLOSE)),lijin8*IF(HIGH=LOW,1,HIGH-MAX(OPEN,CLOSE)));lijin12:=IF(CAPITAL=0,lijin8*(MAX(CLOSE,OPEN)-lijin7),lijin8*IF(HIGH=LOW,1,MAX(CLOSE,OPEN)-lijin7));lijin13:=(lijin9+lijin10-(lijin11+lijin12))/IF(CAPITAL=0,10000,10000);lijin14:=SMA(IF(CLOSE>=REF(CLOSE,1),lijin13,(-lijin13)/100),2,1);lijin15:=SMA(lijin14*120/FROMOPEN*5,2,1);lijin16:=SMA(lijin15,5,1);lijin17:=SMA(lijin16,5,1);lijin18:=CURRBARSCOUNT=1 AND CLOSE< REF(CLOSE,1);lijin19:=REF(lijin14,1)-lijin18;lijin20:=CLOSE>OPEN AND lijin19< 0.02 AND MA(CLOSE,5)>MA(CLOSE,60) AND CLOSE/REF(CLOSE,1)>=1.02 AND HIGH< 通道;lijin21:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100;lijin22:=SMA(lijin21,3,1);lijin23:=SMA(lijin22,3,1);lijin24:=3*lijin22-2*lijin23;lijin25:=MA(CLOSE,5);lijin26:=MA(CLOSE,10);lijin27:=MA(CLOSE,20);lijin28:=MA(CLOSE,30);lijin29:=MA(CLOSE,60);lijin30:=lijin25/LOW;lijin31:=HIGH/lijin25;lijin32:=lijin30>1.1 AND CLOSE>OPEN;lijin33:=lijin31>1.1 AND CLOSE< OPEN;lijin34:=lijin30>1.05 AND CLOSE>OPEN AND CLOSE< lijin25 AND CLOSE< lijin26 AND CLOSE< lijin27 AND CLOSE< lijin29;lijin35:=lijin31>1.05 AND CLOSE< OPEN;lijin36:=lijin29/CLOSE;lijin37:=lijin32>0 AND lijin34>0 AND lijin36>1.5 AND lijin24>lijin22;STICKLINE(lijin37,OPEN,CLOSE,2,0),COLORFF00FF;lijin38:=HIGH>lijin26*1.15 AND CLOSE< OPEN;CTA:=REF(C,1)< 龙头 AND REF(C,2)< 龙头 AND O< 龙头 AND C>龙头;卖:DRAWICON(FILTER(lijin38>0,1),HIGH*1.02,6);买:DRAWICON(CTA,LOW*1.02,15);通达信dll龙头通道C++源代码:#include <vector>
#include <cmath>
#include <algorithm>
struct KLine {
    double high;
    double low;
    double open;
    double close;
    double volume;
};

// 计算加权移动平均线 (WMA)
double WMA(const std::vector<double>& data, int period) {
    double sum = 0.0;
    double weightSum = 0.0;
    for (int i = 0; i < period; ++i) {
        double weight = (period - i);
        sum += data * weight;
        weightSum += weight;
    }
    return sum / weightSum;
}

// 计算指数移动平均线 (EMA)
double EMA(const std::vector<double>& data, int period) {
    double alpha = 2.0 / (period + 1);
    double ema = data[0];
    for (size_t i = 1; i < data.size(); ++i) {
        ema = alpha * data + (1 - alpha) * ema;
    }
    return ema;
}

// 计算通道
double calculateChannel(const std::vector<KLine>& klines, int period) {
    std::vector<double> highs;
    std::vector<double> lows;
    for (constauto& kline : klines) {
        highs.push_back(kline.high);
        lows.push_back(kline.low);
    }
    double wmaHigh = WMA(highs, period);
    double wmaLow = WMA(lows, period);
    return (wmaHigh - wmaLow) * 1 + wmaHigh;
}

// 计算龙头
double calculateLongTou(const std::vector<KLine>& klines, int period) {
    std::vector<double> highs;
    std::vector<double> lows;
    for (constauto& kline : klines) {
        highs.push_back(kline.high);
        lows.push_back(kline.low);
    }
    double wmaHigh = WMA(highs, period);
    double wmaLow = WMA(lows, period);
    return wmaLow - (wmaHigh - wmaLow) * 1;
}

// 计算通道2
double calculateChannel2(double longTou, int period) {
    std::vector<double> longTouData(period, longTou);
    return EMA(longTouData, period);
}

风险提示:本指标仅供技术研究与学习交流使用。资本市场具有高度不确定性,任何基于本指标的投资决策都需要自行承担风险,不构成任何投资建议。

学习分享

学术交流:我们专注于市场的学术交流与研究包括自用指标抄底逃顶零滞后均线最速曲线,以及期货自动化和股票自动化学习。

分享知识:田都元帅,敬神常在,爱人如己,我为人人,与人为善,分享快乐!
彩虹桥投资充电站 版权所有 @ 2018-2020