期货程序化交易之文华指标公式源码

合集下载

最准期货指标公式源码:文华财经精选

最准期货指标公式源码:文华财经精选

最准期货指标公式源码:文华财经精选文华财经精选最准期货指标公式源码指标介绍文华财经精选指标是一款基于量化策略和机器学习技术的期货交易指标。

该指标结合了多种技术指标、市场情绪分析以及资金流向分析,旨在为投资者提供更准确的交易信号和决策支持。

本指标适用于文华财经软件,可通过自定义公式进行调用。

指标公式导入所需库import numpy as npimport pandas as pdimport talib初始化参数length = 10 # 指标周期计算指标值def calculate_indicator(data):计算收盘价序列close_prices = data['close'].values计算指标值indicator_value = talib.SAR(close_prices, length) return indicator_value读取数据data = pd.read_csv('your_data.csv')data['datetime'] = pd.to_datetime(data['datetime']) data.set_index('datetime', inplace=True)计算指标indicator_value = calculate_indicator(data)输出结果print(indicator_value)使用方法1. 首先,您需要准备一份包含收盘价的CSV数据文件,文件名为`your_data.csv`。

数据文件的列名需要包含`datetime`和`close`。

2. 将上述代码复制到Python环境中,并根据实际情况修改代码中的参数,如指标周期`length`。

3. 运行代码,即可得到指标的计算结果。

注意事项1. 本指标公式仅作为参考,实际交易效果可能因市场环境和个股差异而有所不同。

文华财经期货软件指标公式源码精品CCI指标

文华财经期货软件指标公式源码精品CCI指标

文华财经期货软件指标公式源码精品CCI指标CCI指标的计算步骤如下:1.计算典型价格(TP):TP=(最高价+最低价+收盘价)/32.计算平均价(MA):MA=TP的n日简单移动平均3.计算平均绝对偏差(MD):MD=TP与MA之差的绝对值的n日简单移动平均4.计算CCI值(CCI):CCI=(TP-MA)/(0.015*MD)根据CCI值的大小,可以判断市场是超买、超卖还是处于区间内:1.当CCI值大于100时,表示市场超买,价格可能会回落;2.当CCI值小于-100时,表示市场超卖,价格可能会反弹;3.当CCI值在-100至100之间时,表示市场处于区间内,没有明显的超买超卖情况。

下面是一个经过优化的CCI指标的Python源码示例:```pythonimport pandas as pdimport numpy as npdef cci(data, n):tp = (data['high'] + data['low'] + data['close']) / 3ma = tp.rolling(n).meanmd = np.abs(tp - ma).rolling(n).meancci = (tp - ma) / (0.015 * md)return cci# 读取数据,例如从csv文件中读取data = pd.read_csv('data.csv')cci_values = cci(data, 20)#打印CCI值print(cci_values)```在以上代码中,`data`是包含股价或期货价格数据的DataFrame,其中包含`high`(最高价)、`low`(最低价)、`close`(收盘价)等字段。

函数`cci`接受数据和时间周期`n`作为输入,返回计算得到的CCI值。

最后,使用示例数据调用`cci`函数并打印CCI值。

文华财经期货软件指标公式源码至尊分析王指标公式源码

文华财经期货软件指标公式源码至尊分析王指标公式源码

文华财经期货软件指标公式源码至尊分析王指标公式源码介绍本文档将为大家提供文华财经期货软件中的指标公式源码,并着重介绍其中的至尊分析王指标公式源码。

这些源码可以帮助开发者更好地理解和应用文华财经期货软件中的指标分析功能。

至尊分析王指标公式源码1. MACD 源码MACD({CLOSE}, SHORT, LONG, MID) :=EMA({CLOSE}, SHORT) - EMA({CLOSE}, LONG)DIFF = EMA(MACD, MID)在这段源码中,我们定义了 MACD 指标,其中 `SHORT`、`LONG` 和 `MID` 分别表示短期、长期和中期移动平均线的周期;`{CLOSE}` 表示收盘价序列。

通过计算这些周期的指数移动平均线,我们可以得到 MACD 和 DIFF 指标。

2. RSI 源码RSI({CLOSE}, N) :=LC = REF({CLOSE}, 1)UP = SMA(MAX({CLOSE}-LC, 0), N)DOWN = SMA(MAX(LC-{CLOSE}, 0), N)RSI = UP / (UP + DOWN) * 100在这段源码中,我们定义了 RSI 指标,其中 `N` 表示计算 RSI的周期;`LC` 表示前一个收盘价;`UP` 表示价格上涨的平均值;`DOWN` 表示价格下跌的平均值。

通过计算这些值,我们可以得到RSI 指标。

3. BOLL 源码MA = MA({CLOSE}, N)MD = STD(MA, N)UPPER = MA + K * MDLOWER = MA - K * MD在这段源码中,我们定义了 BOLL 指标,其中 `N` 表示计算BOLL 的周期;`MA` 表示简单移动平均线;`MD` 表示平均线的标准差;`K` 表示标准差的倍数。

通过计算这些值,我们可以得到BOLL 指标中的上轨和下轨。

总结本文档提供了文华财经期货软件中的至尊分析王指标公式源码。

文华财经期货指标软件公式源码期货永远只用一根均线公式源码

文华财经期货指标软件公式源码期货永远只用一根均线公式源码

文华财经期货指标软件公式源码期货永远只用一根均线公式源码以下是一个用于计算期货指标的简单均线公式源码示例:```pythonimport numpy as npdef calculate_ma(data, window):ma_values = []for i in range(len(data)):if i < window:ma_values.append(np.mean(data[:i+1]))else:ma_values.append(np.mean(data[i-window+1:i+1]))return ma_values```在这个源码中,`calculate_ma` 函数接受两个参数:`data` 和`window`。

`data` 是包含历史期货价格数据的列表,`window` 是均线的时间窗口,即需要计算的过去多少个价格数据的均值。

函数首先创建一个空列表 `ma_values` 来存储计算出的均线值。

然后使用一个 `for` 循环遍历输入的数据列表 `data`,对于每个时间点,使用 `np.mean` 函数计算出前 `window` 个数据的均值,将其添加到`ma_values` 列表中。

最后,当遍历完所有的数据点后,函数返回 `ma_values` 列表,包含了计算出的均线值。

需要注意的是,由于均线的计算需要使用到历史数据,所以在窗口大小小于数据长度时,对于前 `window-1` 个数据点,使用了对应的所有数据进行计算。

而对于后面的数据点,则使用的是对应窗口内的历史数据。

在使用这个源码时,你将需要提供一个包含历史期货价格数据的列表和一个窗口大小。

例如,在以下示例中,我们使用了一个包含10个随机生成的价格数据的列表来计算一个5天的简单移动均线:```pythondata = [45.6, 44.3, 42.1, 43.2, 41.9, 43.5, 44.2, 42.8, 41.5, 43.7]window = 5ma_values = calculate_ma(data, window)print(ma_values)```请注意,这只是一个简单的示例,你可以根据需要自行修改和扩展代码来实现更复杂的期货指标计算。

文华财经期货软件指标公式源码期货傻瓜式买卖指标

文华财经期货软件指标公式源码期货傻瓜式买卖指标

文华财经期货软件指标公式源码期货傻瓜式买卖指标以下是一个用Python编写的期货买卖指标的示例代码,包含了几个常见的指标公式:```pythonimport pandas as pdfrom talib.abstract import *#读取期货数据data = pd.read_csv('futures_data.csv')#计算技术指标data['macd'], data['macdsignal'], data['macdhist'] = MACD(data, fastperiod=12, slowperiod=26, signalperiod=9) #生成买卖信号data['buy_signal'] = (data['sma_5'] > data['sma_10']) & (data['rsi_14'] < 30) & (data['macd'] > data['macdsignal']) data['sell_signal'] = (data['sma_5'] < data['sma_10']) ,(data['rsi_14'] > 70) , (data['macd'] < data['macdsignal']) #模拟交易position = 0 # 仓位for i in range(len(data)):if data['buy_signal'][i]:if position == 0: # 无仓位,买入position = 1entry_price = data['close'][i]print(f"买入:{entry_price}")elif data['sell_signal'][i]:if position == 1: # 有仓位,卖出position = 0exit_price = data['close'][i]pnl = (exit_price - entry_price) / entry_priceprint(f"卖出:{exit_price},盈亏:{pnl}")#输出结果print(data)```在这个示例代码中,我们使用了Pandas库来读取期货数据,并使用了TALib库来计算一些常见的技术指标,如简单移动平均(SMA)、相对强弱指标(RSI)、移动平均收敛/发散指标(MACD)和布林带(BBANDS)。

文华期货软件公式指标最神奇的主图买卖指标文华财经指标公式源码公式源码

文华期货软件公式指标最神奇的主图买卖指标文华财经指标公式源码公式源码

/*A1:=REF(HIGH,3)=HHV(HIGH,2*3+1); B1:=FILTER(A1,3);C1:=BACKSET(B1,3+1); D1:=FILTER(C1,3);{高点}A2:=REF(LOW,3)=LLV(LOW,2*3+1); B2:=FILTER(A2,3);C2:=BACKSET(B2,3+1); D2:=FILTER(C2,3);{低点}E1:=(REF(LLV(LOW,2*3),1)+REF(HHV(HIGH,2*3),1))/2;E2:=(HIGH+LOW)/2;{高低点出现在同一K线上时可作取舍}H1:=(D1 AND NOT(D2 AND E1>=E2)) OR ISLASTBAR OR BARSCOUNT(CLOSE)=1;L1:=(D2 AND NOT(D1 AND E1<E2)); H2:=D1 AND NOT(D2 AND E1>=E2);X1:=REF(BARSLAST(H1),1)+1; F1:=BACKSET(H1 ANDCOUNT(L1,X1)>0,LLVBARS(IF(L1,LOW,10000),X1));G1:=F1>REF(F1,1); I1:=BACKSET(G1,2); LD:=I1>REF(I1,1);{过滤后低点}L2:=LD OR ISLASTBAR OR BARSCOUNT(CLOSE)=1;X2:=REF(BARSLAST(L2),1)+1; F2:=BACKSET(L2 ANDCOUNT(H2,X2)>0,HHVBARS(IF(H2,HIGH,0),X2));G2:=F2>REF(F2,1); I2:=BACKSET(G2,2); HD:=I2>REF(I2,1);{过滤后高点}DRAWLINE(LD,L,HD,H,0),COLORWHITE,LINETHICK1,POINTDOT; DRAWLINE(HD,H,LD,L,0),COLORWHITE,LINETHICK1,POINTDOT;J1:=BACKSET(ISLASTBAR,MIN(BARSLAST(HD),BARSLAST(LD))+1); J2:=J1>REF(J1,1);DRAWLINE(J2,IF(HD,H,L),ISLASTBAR,IF(BARSLAST(HD)>BARSLAST( LD),H,L),0),COLORWHITE,LINETHICK1,POINTDOT;{以上语句为新结构波浪}A3:=H<REF(H,REF(BARSLAST(HD),1)+1);B3:=REF(H,REF(BARSLAST(HD),1)+1)>REF(H,REF(BARSLAST(HD),1 )+2+REF(BARSLAST(HD),REF(BARSLAST(HD),1)+2));D3:=A3 AND B3 AND HD;E3:=BACKSET(D3,REF(BARSLAST(HD),1)+2);HH:=E3>REF(E3,1);{找出全部长期高点}A4:=L>REF(L,REF(BARSLAST(LD),1)+1);B4:=REF(L,REF(BARSLAST(LD),1)+1)<REF(L,REF(BARSLAST(LD),1) +2+REF(BARSLAST(LD),REF(BARSLAST(LD),1)+2));D4:=A4 AND B4 AND LD;E4:=BACKSET(D4,REF(BARSLAST(LD),1)+2); LL:=E4>REF(E4,1);{找出全部长期低点}DRAWICON(HH,H,10),ALIGN2; DRAWICON(LL,L,12),ALIGN1;H3:=HH OR ISLASTBAR OR BARSCOUNT(C)=1; {后面进行过滤,方法同前。

文华财经软件-期货界最准确指标公式源码

文华财经软件-期货界最准确指标公式源码

文华财经软件-期货界最准确指标公式源码简介本文档提供了文华财经软件中期货界最准确指标的源码。

这些指标公式经过独立决策而非用户协助,旨在发挥我作为法律硕士的优势,并遵循简单策略,避免法律复杂性。

所有引用内容均可确认。

目标本文档的目标是提供文华财经软件中期货界最准确指标的源码,以便用户能够使用这些源码进行技术分析和预测。

源码以下是文华财经软件中几个期货界最准确指标的源码示例:1. 移动平均线指标def moving_average(data, period):return data.rolling(window=period).mean()2. 相对强弱指标(RSI)def rsi(data, period):delta = data.diff()up, down = delta.copy(), delta.copy()up[up < 0] = 0down[down > 0] = 0average_gain = up.rolling(window=period).mean()average_loss = abs(down.rolling(window=period).mean())rs = average_gain / average_lossrsi = 100 - (100 / (1 + rs))return rsi3. 布林带指标def bollinger_bands(data, period, std):mid_band = data.rolling(window=period).mean()upper_band = mid_band + std * data.rolling(window=period).std() lower_band = mid_band - std * data.rolling(window=period).std() return mid_band, upper_band, lower_band4. 随机指标(KDJ)def kdj(data, period):lowest_low = data.rolling(window=period).min()highest_high = data.rolling(window=period).max()rsv = (data - lowest_low) / (highest_high - lowest_low) * 100k = rsv.rolling(window=3).mean()d = k.rolling(window=3).mean()j = 3 * k - 2 * dreturn k, d, j请注意,以上仅是示例源码,实际使用时需要适应具体的数据来源和参数设置。

文华财经期货软件指标公式源码突破买卖点指标公式源码

文华财经期货软件指标公式源码突破买卖点指标公式源码

/*VAR1:=EMA(EMA(EMA(C,5),8),13);VAR2:=((VAR1-REF(VAR1,1))/REF(VAR1,1))*618;VAR3:=MA(VAR2,8);VAR4:=VAR2-VAR3;VAR5:=SMA(VAR4,3,1);短:WMA(EXPMA(((3*C)+(2*O)+H+L)/7,3),3),COLORFFFFFF; 道:IF(1,SMA(短,8,1),DRAWNULL),COLORCC99AA,LINETHICK2; IF(VAR2>=VAR3,道,DRAWNULL),COLOR6600CC,LINETHICK2; VARC:=BARSLAST(VAR4>=REF(VAR4,1));VARD:=BARSLAST(VAR4<=REF(VAR4,1));神10:MA(C,10);神30:=MA(C,30);神60:MA(C,60);神120:MA(C,120);神250:MA(C,250);STICKLINE(VARC=0 AND C>MA(C,250) AND C>MA(C,20) AND C>MA(C,60) AND C>MA(C,160) ANDC<O,H,L,0,0),COLORFFCC00;{好}STICKLINE(VARC=0 AND C>MA(C,250) AND C>MA(C,20) AND C>MA(C,60) AND C>MA(C,160) AND C>O,H,L,0,0),COLOR0000FF; STICKLINE(VARC=0 AND C>MA(C,250) AND C>MA(C,20) AND C>MA(C,60) AND C>MA(C,160),C,O,4 ,0 ),COLOR0000AA; STICKLINE(VARC=0 AND C>MA(C,250) AND C>MA(C,20) AND C>MA(C,60) AND C>MA(C,160),C,O,3.3 ,0 ),COLOR0011BB; STICKLINE(VARC=0 AND C>MA(C,250) AND C>MA(C,20) AND C>MA(C,60) AND C>MA(C,160),C,O,2.2,0 ),COLOR0022CC; STICKLINE(VARC=0 AND C>MA(C,250) AND C>MA(C,20) AND C>MA(C,60) AND C>MA(C,160),C,O,1.65 ,0 ),COLOR0033DD; STICKLINE(VARC=0 AND C>MA(C,250) AND C>MA(C,20) AND C>MA(C,60) AND C>MA(C,160),C,O,1.1 ,0 ),COLOR0044EE; STICKLINE(VARC=0 AND C>MA(C,250) AND C>MA(C,20) AND C>MA(C,60) AND C>MA(C,160),C,O,0.55 ,0 ),COLOR0055FF; STICKLINE(VARC=0 AND C<MA(C,250) ANDC>O ,H,L,0,0),COLOR0000FF;STICKLINE(VARC=0 AND C<MA(C,250) ANDC<O ,H,L,0,0),COLORFFCC00;STICKLINE(VARC=0 AND C<MA(C,250),C,O,0,0),COLORFF9900; STICKLINE(VARC=0 ANDC<MA(C,250),CLOSE,OPEN,3,0),COLORFF5500;STICKLINE(VARC=0 ANDC<MA(C,250),CLOSE,OPEN,2.8,0),COLORFF6600; STICKLINE(VARC=0 ANDC<MA(C,250),CLOSE,OPEN,2.5,0),COLORFF7700; STICKLINE(VARC=0 ANDC<MA(C,250),CLOSE,OPEN,2.2,0),COLORFF8800; STICKLINE(VARC=0 ANDC<MA(C,250),CLOSE,OPEN,1.7,0),COLORFF9900; STICKLINE(VARC=0 ANDC<MA(C,250),CLOSE,OPEN,1.2,0),COLORFFAA00; STICKLINE(VARC=0 ANDC<MA(C,250),CLOSE,OPEN,0.7,0),COLORFFCC00; STICKLINE(VARC=0 ANDC<MA(C,250),CLOSE,OPEN,0.2,0),COLORFFFF00; STICKLINE(VARC=0 AND C<MA(C,20) ANDC>O ,H,L,0,0),COLOR0000FF;STICKLINE(VARC=0 AND C<MA(C,20) ANDC<O ,H,L,0,0),COLORFFCC00;STICKLINE(VARC=0 AND C<MA(C,20),C,O,0,0),COLORFF9900; STICKLINE(VARC=0 ANDC<MA(C,20),CLOSE,OPEN,3,0),COLORFF5500;STICKLINE(VARC=0 ANDC<MA(C,20),CLOSE,OPEN,2.8,0),COLORFF6600; STICKLINE(VARC=0 ANDC<MA(C,20),CLOSE,OPEN,2.5,0),COLORFF7700; STICKLINE(VARC=0 ANDC<MA(C,20),CLOSE,OPEN,2.2,0),COLORFF8800; STICKLINE(VARC=0 ANDC<MA(C,20),CLOSE,OPEN,1.7,0),COLORFF9900; STICKLINE(VARC=0 ANDC<MA(C,20),CLOSE,OPEN,1.2,0),COLORFFAA00; STICKLINE(VARC=0 ANDC<MA(C,20),CLOSE,OPEN,0.7,0),COLORFFCC00; STICKLINE(VARC=0 ANDC<MA(C,20),CLOSE,OPEN,0.2,0),COLORFFFF00; STICKLINE(VARC=0 AND C<MA(C,60) ANDC>O ,H,L,0,0),COLOR0000FF;STICKLINE(VARC=0 AND C<MA(C,60) ANDC<O,H,L,0,0),COLORFFCC00;STICKLINE(VARC=0 AND C<MA(C,60),C,O,0,0),COLORFF9900;STICKLINE(VARC=0 ANDC<MA(C,60),CLOSE,OPEN,3,0),COLORFF5500;STICKLINE(VARC=0 ANDC<MA(C,60),CLOSE,OPEN,2.8,0),COLORFF6600;STICKLINE(VARC=0 ANDC<MA(C,60),CLOSE,OPEN,2.5,0),COLORFF7700;STICKLINE(VARC=0 ANDC<MA(C,60),CLOSE,OPEN,2.2,0),COLORFF8800;STICKLINE(VARC=0 ANDC<MA(C,60),CLOSE,OPEN,1.7,0),COLORFF9900;STICKLINE(VARC=0 ANDC<MA(C,60),CLOSE,OPEN,1.2,0),COLORFFAA00;STICKLINE(VARC=0 ANDC<MA(C,60),CLOSE,OPEN,0.7,0),COLORFFCC00;STICKLINE(VARC=0 ANDC<MA(C,60),CLOSE,OPEN,0.2,0),COLORFFFF00;STICKLINE(VARC=0 AND C<MA(C,160) ANDC>O,H,L,0,0),COLOR0000FF;STICKLINE(VARC=0 AND C<MA(C,160) ANDC<O,H,L,0,0),COLORFFCC00;STICKLINE(VARC=0 AND C<MA(C,160) ,C,O,0,0),COLORFF9900; STICKLINE(VARC=0 ANDC<MA(C,160) ,CLOSE,OPEN,3,0),COLORFF5500; STICKLINE(VARC=0 ANDC<MA(C,160) ,CLOSE,OPEN,2.8,0),COLORFF6600; STICKLINE(VARC=0 ANDC<MA(C,160) ,CLOSE,OPEN,2.5,0),COLORFF7700; STICKLINE(VARC=0 ANDC<MA(C,160) ,CLOSE,OPEN,2.2,0),COLORFF8800; STICKLINE(VARC=0 ANDC<MA(C,160) ,CLOSE,OPEN,1.7,0),COLORFF9900; STICKLINE(VARC=0 ANDC<MA(C,160) ,CLOSE,OPEN,1.2,0),COLORFFAA00; STICKLINE(VARC=0 ANDC<MA(C,160) ,CLOSE,OPEN,0.7,0),COLORFFCC00; STICKLINE(VARC=0 ANDC<MA(C,160) ,CLOSE,OPEN,0.2,0),COLORFFFF00; STICKLINE(VARD=0 AND C>O,H,L,0,0),COLOR0000FF; STICKLINE(VARD=0 AND C<O,H,L,0,0),COLORFFCC00; STICKLINE(VARD=0,C,O,0,0),COLORFF9900; STICKLINE(VARD=0,CLOSE,OPEN,3,0),COLORFF5500; STICKLINE(VARD=0,CLOSE,OPEN,2.8,0),COLORFF6600; STICKLINE(VARD=0,CLOSE,OPEN,2.5,0),COLORFF7700; STICKLINE(VARD=0,CLOSE,OPEN,2.2,0),COLORFF8800;STICKLINE(VARD=0,CLOSE,OPEN,1.7,0),COLORFF9900; STICKLINE(VARD=0,CLOSE,OPEN,1.2,0),COLORFFAA00; STICKLINE(VARD=0,CLOSE,OPEN,0.7,0),COLORFFCC00; STICKLINE(VARD=0,CLOSE,OPEN,0.2,0),COLORFFFF00;STICKLINE(VARD=0 AND H>MA(C,5) AND C>MA(C,250) AND C>MA(C,60) AND C>MA(C,160) AND MA(C,5)>MA(C,20) AND C>O,H,L,0,0),COLOR0000FF;STICKLINE(VARD=0 AND H>MA(C,5) AND C>MA(C,250) AND C>MA(C,60) AND C>MA(C,160) AND MA(C,5)>MA(C,20) AND C<O,H,L,0,0),COLORFFCC00;STICKLINE(VARD=0 AND H>MA(C,5) AND C>MA(C,250) AND C>MA(C,60) AND C>MA(C,160) ANDMA(C,5)>MA(C,20),C,O,0,0),COLOR0088EE;{好} STICKLINE(VARD=0 AND H>MA(C,5) AND C>MA(C,250) AND C>MA(C,60) AND C>MA(C,160) ANDMA(C,5)>MA(C,20),C,O,4 ,0 ),COLOR0000AA;STICKLINE(VARD=0 AND H>MA(C,5) AND C>MA(C,250) AND C>MA(C,60) AND C>MA(C,160) ANDMA(C,5)>MA(C,20),C,O,3.3 ,0 ),COLOR0011BB; STICKLINE(VARD=0 AND H>MA(C,5) AND C>MA(C,250) AND C>MA(C,60) AND C>MA(C,160) ANDMA(C,5)>MA(C,20),C,O,2.2,0 ),COLOR0022CC;STICKLINE(VARD=0 AND H>MA(C,5) AND C>MA(C,250) AND C>MA(C,60) AND C>MA(C,160) ANDMA(C,5)>MA(C,20),C,O,1.65 ,0 ),COLOR0033DD;STICKLINE(VARD=0 AND H>MA(C,5) AND C>MA(C,250) AND C>MA(C,60) AND C>MA(C,160) ANDMA(C,5)>MA(C,20),C,O,1.1 ,0 ),COLOR0044EE;STICKLINE(VARD=0 AND H>MA(C,5) AND C>MA(C,250) AND C>MA(C,60) AND C>MA(C,160) ANDMA(C,5)>MA(C,20),C,O,0.55 ,0 ),COLOR0055FF;情3:=VARC=0 AND C>MA(C,20) AND (BARSCOUNT(C)+1)<365 ; STICKLINE(情3 AND C>O,H,L,0,0),COLOR0000FF; STICKLINE(情3 AND C<O,H,L,0,0),COLORFFCC00; STICKLINE(情3,C,O,-1,0),COLOR001235;STICKLINE(情3 AND C<O,H,L,0,0),COLORFFCC00; STICKLINE(情3 AND C>O,H,L,0,0),COLOR0000FF; STICKLINE(情3,C,O,4 ,0 ),COLOR0000AA;STICKLINE(情3,C,O,3.3 ,0 ),COLOR0011BB;STICKLINE(情3,C,O,2.2,0 ),COLOR0022CC;STICKLINE(情3,C,O,1.65 ,0 ),COLOR0033DD;STICKLINE(情3,C,O,1.1 ,0 ),COLOR0044EE;STICKLINE(情3,C,O,0.55 ,0 ),COLOR0055FF;神线1:=MA(C,20)-MA(C,250);神线2:=MA(C,60)-MA(C,250);神功1:=MA(神线1,1)*4;神功2:=EMA(神线2,1)*4,COLORFFFF80;YS1:=(HIGH+LOW+CLOSE*2)/4;RK3:=EMA(YS1,10);RK4:=STD(YS1,10);RK5:=(YS1-RK3)*100/RK4;RK6:=EMA(RK5,5);RK7:=EMA(RK6,10);涨:=EMA(RK6,10)+100/2-5,COLORRED;股灾2:=NOT(REF(C<O,1) AND C<REF(H,1) );股灾3:=NOT(C<REF(H,1) AND C<REF(H,2) OR C<REF(H,3) ORC<REF(H,4) OR C<REF(H,5));股灾4:=NOT(COUNT(C<O,7) >=5 ANDSUM(C/REF(C,1)<0.96,7)>=1);股灾5:=NOT( 道<MA(C,60) AND MA(C,60)<REF(MA(C,60),1) AND C<MA(C,60) );股灾6:=NOT(道<REF(道,1) AND C<道);股灾7:=SUM(SUM(C/REF(C,1)>1.099,7)>=5 ANDC>MA(C,250),60)<1;股灾8:=SUM(HHVBARS(HIGH,90)>LLVBARS(HIGH,90) AND(HHV( HIGH,90)-LLV( LOW,90))/LLV( LOW,90)*100>50 ANDC>MA(C,250) ,90) <1;股灾9:=NOT(MA(C,5)<MA(C,10) AND MA(C,10)<MA(C,20) ANDMA(C,20)<MA(C,30) AND MA(C,20)<MA(C,120) ANDMA(C,120)<MA(C,90) AND MA(C,20)<REF(MA(C,20),1) ANDMA(C,30)<REF(MA(C,30),1) AND MA(C,60)<REF(MA(C,60),1) ) ;股灾12:=SUM((C/REF(C,1)<0.91 AND L=C),30)<1;股灾13:=SUM((C/REF(C,1))<0.93,10)<1;股灾15:=NOT( MA(C,10)<MA(C,20) AND MA(C,20)<MA(C,30) AND MA(C,30)<MA(C,60) AND MA(C,10)<REF(MA(C,10),1) ANDMA(C,20)<REF(MA(C,20),1) AND MA(C,30)<REF(MA(C,30),1) AND MA(C,120)>MA(C,250) AND MA(C,90)>MA(C,120) AND O<MA(C,120) AND C<MA(C,20) ) ;股灾总:=股灾2 AND 股灾3 AND 股灾4 AND 股灾5 AND 股灾6 AND 股灾7 AND 股灾8 AND 股灾9 AND 股灾12 AND 股灾13 AND 股灾15;P1:=涨>REF(涨,1) AND REF(涨,1)<REF(涨,2) AND H>MA(C,250) AND MA(C,10)>MA(C,250) AND MA(C,20)>MA(C,250) ANDMA(C,250)>REF(MA(C,250),1) AND LLV(C,15)<MA(C,250) AND 股灾13 AND C>O;P2:=涨>REF(涨,1) AND REF(涨,1)<REF(涨,2) ANDMA(C,10)>MA(C,250) AND MA(C,20)>MA(C,250) ANDMA(C,250)>REF(MA(C,250),1) AND MA(C,120)>REF(MA(C,120),1) AND LLV(C,15)<MA(C,120) AND C>O AND C>MA(C,120) AND 股灾12 AND 股灾15 AND 股灾9;P3:=涨>REF(涨,1) AND REF(涨,1)<REF(涨,2) AND H>MA(C,60) AND MA(C,10)>MA(C,250) AND MA(C,20)>MA(C,250) ANDMA(C,250)>REF(MA(C,250),1) AND MA(C,20)>REF(MA(C,20),1) AND MA(C,90)>REF(MA(C,90),1) AND C>MA(C,20) AND C>O ANDC/REF(C,1)<1.099 AND LLV(C,5)<MA(C,120);P4:=涨>REF(涨,1) AND REF(涨,1)<REF(涨,2) AND H>MA(C,20) AND MA(C,20)>MA(C,60) AND MA(C,60)>MA(C,120) ANDMA(C,120)>MA(C,250) AND MA(C,250)>REF(MA(C,250),1) ANDMA(C,20)>REF(MA(C,20),1) AND MA(C,60)>REF(MA(C,60),1) AND C>MA(C,20) AND C>O AND NOT(REF(C,1)/REF(C,2)<0.97) AND LLV(C,5)<MA(C,20) AND REF(C,1)/REF(C,2)<1.099 ANDSUM(C<=O,7)<5 AND C>神功2 AND 神功2>REF(神功2,1)+0.01 AND ABS(MA(C,10)-MA(C,20))>ABS(MA(C,10)-MA(C,30));P5:=涨>REF(涨,1) AND REF(涨,1)<REF(涨,2) ANDMA(C,10)>MA(C,250) AND MA(C,20)>MA(C,250) ANDMA(C,250)>REF(MA(C,250),1) AND MA(C,120)>REF(MA(C,120),1) AND LLV(C,15)<MA(C,120) AND C>O AND C>MA(C,250) ANDC<MA(C,120) AND 股灾12 AND 股灾15 AND 股灾9;停牌:=NOT(NAMELIKE('ST') AND NAMELIKE('*ST') OR NAMELIKE('S')) AND (BARSCOUNT(C)+1)>30 AND DYNAINFO(10)>100;{好}选:=P1 OR P2 OR P3 OR P4 OR P5 AND 停牌 AND 股灾总;STICKLINE(选 AND SUM(选,10)<2,L,L-0.01,3,0) ,COLORYELLOW; DRAWTEXT( 选 AND SUM(选,10)<2,L-0.02,'↖买'),COLOR00FFFF;*/CS:=(CLOSE-LLV(LOW,8))/(HHV(HIGH,8)-LLV(LOW,8))*100;通达信:(EMA(CS,3)-50)*2,COLORRED,LINETHICK3;买入点:IF(通达信<-80,35,0),LINETHICK1,COLORWHITE;极弱:-80,COLORFF00FF;超买:73,COLORCY AN,LINETHICK3;弱势:-60,COLORFFFF00;STICKLINE1(通达信<REF(通达信,1) AND 通达信>0,0,通达信,4,0),COLOR00AAFF; STICKLINE1(通达信<REF(通达信,1) AND 通达信>0,0,通达信,4.4,0),COLOR00CCFF; STICKLINE1(通达信>=REF(通达信,1) AND 通达信>0,0,通达信,4,0),COLOR0000AA; STICKLINE1(通达信>=REF(通达信,1) AND 通达信>0,0,通达信,4.4,0),COLOR0022CC; STICKLINE1(通达信>REF(通达信,1) AND 通达信<0,0,通达信,4,0),COLORAA00BB; STICKLINE1(通达信>REF(通达信,1) AND 通达信<0,0,通达信,4.4,0),COLORCC22BB; STICKLINE1(通达信<=REF(通达信,1) AND 通达信<0,0,通达信,4,0),COLORFF7700; STICKLINE1(通达信<=REF(通达信,1) AND 通达信<0,0,通达信,4.4,0),COLORFFAA22;V AR18:=(HIGH+LOW+CLOSE)/3;V AR19:=(V AR18-MA(V AR18,14))/(0.015*A VEDEV(V AR18,14));V AR1A:=(V AR18-MA(V AR18,70))/(0.015*A VEDEV(V AR18,70));V AR1B:=IF(VAR19>=150 AND V AR19<200 AND V AR1A>=150 AND V AR1A<200,-10,0);V AR1C:=IF(VAR19<=-150 AND V AR19>-200 AND V AR1A<=-150 AND V AR1A>-200,10,0);V AR1D:=(CLOSE-MA(CLOSE,13))/MA(CLOSE,13)*100;V AR1E:=100-ABS(V AR1D);买入:IF(BARSCOUNT(CLOSE)<70,-80,IF(V AR1A<=-200 AND V AR19<=-150,15,V AR1C)-80),COLORYELLOW,LINETHICK2;DRAWICON(CROSS(通达信,超买) ,通达信,'ICO1');。

文华财经期货指标软件公式源码期货永远只用一根均线公式源码

文华财经期货指标软件公式源码期货永远只用一根均线公式源码

/*LS3:=LLV(HIGH,240);LS4:=100*(CLOSE-LS3)/LS3;LS5:=REF(LLV(CLOSE,480),1);LS6:=REF(HHV(CLOSE,480),1);LS7:=100*(CLOSE-LS5)/(LS6-LS5);LS8:=(CLOSE-LLV(CLOSE,981))/(HHV(CLOSE,981)-LL V(CLOSE,981))*100;LS9:=(CLOSE-LLV(CLOSE,393))/(HHV(CLOSE,393)-LLV(CLOSE,393))*100;LSA:=(CLOSE-LLV(LOW,981))/(HHV(HIGH,981)-LLV(LOW,981))*100;LSB:=(CLOSE-LLV(LOW,393))/(HHV(HIGH,393)-LLV(LOW,393))*100;LSC1:=EMA(100*(CLOSE-LLV(LOW,100))/(HHV(HIGH,100)-LLV(LOW,100)),5);LSC:=LSC1/4;LSD:=IF(LSC>23.6,LSC,0);LSE:=LSC<1;LSF:=LSD;LS10:=LS4<LS7 AND LS4<0;LS11:=1;LS12:=(HIGH+LOW+CLOSE*2)/4*LS11;LS13:=EMA(LS12,21);LS14:=STD(LS12,21);LS15:=((LS12-LS13)/LS14*100+200)/4*LS11;LS161:=EMA(LS15,89);LS16:=(LS161-25)*1.56*LS11;LS171:=EMA(LS16,5);LS17:=LS171*1.22*LS11;LS181:=EMA(LS17,3);LS18:=LS181*LS11;LS19:=3*LS17-2*LS18*LS11;LS1A:=IF(CROSS(LS19,LS17)AND CROSS(LS19,LS18)AND CROSS(LS17,LS18),1,0);LS1B:=IF(CROSS(LS17,LS19)AND CROSS(LS18,LS19)AND CROSS(LS18,LS17),1,0);LS1C:=EMA(100*(CLOSE-LLV(LOW,100))/(HHV(HIGH,100)-LLV(LOW,100)),13)/4;LS1D1:=EMA(CLOSE,2);LS1D2:=EMA(CLOSE,89);LS1D:=LS1D1-LS1D2;LS1E:=EMA(LS1D,30);LS1F:=(LS1D-LS1E)*20;LS20:=POW(LS1F,3)*0.1+POW(LS1F,2);LS21:=SQRT(SQRT(LOW*HIGH*OPEN*CLOSE));LS22:=EMA(LS21*0.97,3);LS23:=(HIGH+LOW+CLOSE)/3;LS24:=(LS23-MA(LS23,14))/(0.015*AVEDEV(LS23,14));LS25:=IF(LS1F>0.015,LS20,0)/45;庄拉线:=LS25;LS261:=EMA(CLOSE,2);LS262:=EMA(CLOSE,150);LS26:=LS261-LS262;LS27:=EMA(LS26,100);LS28:=2*(LS26-LS27);LS29:=POW(LS28,3)*0.1+POW(LS28,1);LS2A:=SQRT(SQRT(LOW*HIGH*OPEN*CLOSE));LS2B:=EMA(LS2A*0.97,3);LS2C:=(HIGH+LOW+CLOSE)/3;LS2D:=(LS2C-MA(LS2C,14))/(0.015*AVEDEV(LS2C,14));黑马线:=IF(LS28>0.1,LS29,0)*5;量价线:=(CLOSE-MA(CLOSE,21))/MA(CLOSE,21)*100;{黑马精准线参数顶底开关 0 1 0 点位差0 1 0 指定点 0 1000 0} DRAWGBK(O>0,RGB(33,47,58),RGB(0,0,0),0,'02',0);{标缺口}LL:=REF(L,1);HH:=REF(H,1);上跳:=L>HH;下跳:=H<LL; STICKLINE(L>REF(H,1),L,REF(H,1),3.1,-1),COLORRED; STICKLINE(REF(L,1)>H,REF(L,1),H,3.1,-1),COLORGREEN;{灰色}STICKLINE(O>=C,H,L,0,0),COLOR909090;STICKLINE(O>=C,C,O,3.1,0),COLOR606060;STICKLINE(O>=C,C,O,2.1,0),COLOR707070;STICKLINE(O>=C,C,O,1.2,0),COLOR808080;STICKLINE(O>=C,C,O,0.2,0),COLOR909090;STICKLINE(O<=C,H,L,0,0),COLOR666B6F;STICKLINE(C>O,C,O,3.1,1),COLOR666B6F;V2V:=V/REF(V,1)>=1.9 AND C>REF(C,1);{金黄色}STICKLINE(V2V,H,L,0,0),COLORYELLOW;STICKLINE(V2V,O,C,3.1,0),COLOR0033FF;STICKLINE(V2V,O,C,2.1,0),COLOR0077FF;STICKLINE(V2V,O,C,1.1,0),COLOR00BBFF;STICKLINE(V2V,O,C,0.1,0),COLOR00FFFF;{涨停粉}ZT:=C/REF(C,1)>1.097;ZT数:COUNT(ZT,BARSSINCE(ZT)),NODRAW;{涨停红色}ZDF:=(C-REF(C,1))/REF(C,1)*100;STICKLINE(ZDF>9.5,C,O,3.1,0),COLOR0000CC;STICKLINE(ZDF>9.5,C,O,2.1,0),COLOR0000DD;STICKLINE(ZDF>9.5,C,O,1.2,0),COLOR0000EE;STICKLINE(ZDF>9.5,C,O,0.2,0),COLOR0000FF;STICKLINE(ZDF>9.5,H,L,0,0),COLOR0000FF;{跌停绿色}STICKLINE(ZDF<-9.9,O,C,3.1,0),COLOR66CC66;STICKLINE(ZDF<-9.9,O,C,2.1,0),COLOR77DD77;STICKLINE(ZDF<-9.9,O,C,1.2,0),COLOR88EE88;STICKLINE(ZDF<-9.9,O,C,0.2,0),COLOR99FF99;STICKLINE(ZDF<-9.5,H,L,0,0),COLOR99FF99;均价:=AMO/VOL/100;假阴真阳:=C<O AND C>=REF(MIN(C,O),1) AND 均价>REF(均价,1);{蓝}DT:=假阴真阳;STICKLINE(DT,H,L,0,0),COLORFFAA00;STICKLINE(DT,O,C,3,0),COLORFF3300;STICKLINE(DT,O,C,2,0),COLORFF7700;STICKLINE(DT,O,C,1,0),COLORFFAA00;STICKLINE(DT,O,C,0.1,0),COLORFFFF00;YX:=REF(O,BARSLAST(假阴真阳));假阴实顶:YX,COLORFF7700,NODRAW;STICKLINE(V,YX,YX,1,0),COLORFF7700;L0:=点位差/100;前极点精准线:IF(顶底开关=0,CONST(REF(L,指定点)),CONST(REF(H,指定点))),COLOR178448;DRAWICON(ABS(L-前极点精准线)<=L0,前极点精准线*0.99,38);DRAWICON(ABS(H-前极点精准线)<=L0,前极点精准线*1.01,39);{H极点精准线:CONST(REF(H,指定点)),COLOR7777FF;DRAWICON(ABS(H极点精准线-H)<=L0,H极点精准线*1.01,35);DRAWICON(ABS(H极点精准线-L)<=L0,H极点精准线*0.99,34);}{极点精准线:CONST(L),COLOR0077FF;DRAWICON(ABS(L-极点精准线)<=L0,极点精准线*0.99,1);DRAWICON(ABS(H-极点精准线)<=L0,极点精准线*1.01,2);同向极点精准数:COUNT(ABS(L-极点精准线)<=L0,60)-1,COLOR0077FF,NODRAW;异向极点精准数:COUNT(ABS(H-极点精准线)<=L0,60),COLOR0077FF,NODRAW;XG:=同向极点精准数>0 AND 异向极点精准数>0;}{DIFF:=10*(EMA(CLOSE,12)-EMA(CLOSE,26));DEA:=EMA(DIFF,9);MACD:=2*(DIFF-DEA);量缩价涨:=C<REF(O,1) AND V<REF(V,1) AND MACD>REF(MACD,1) AND C>REF(C,1) AND REF(C<O,1) AND C>O;阴KDAY:=BARSLAST(量缩价涨)+1;STICKLINE(V,REF(O,阴KDAY),REF(O,阴KDAY),3.5,0),COLORMAGENTA;DRAWICON(CROSS(C,REF(O,阴KDAY)),L,1);}{梅开二度}EMA13:=EMA(C,13),COLORWHITE,LINETHICK2;EMA34:=EMA(C,34),COLORYELLOW;EMA55:=EMA(C,55),COLORFF00FF;EMA120:=EMA(C,120),COLORFFCC66;{STICKLINE(ER,H,L,0.5,1),COLOR0099FF;STICKLINE(ER,O,C,6,1),LINETHICK2,COLOR0099FF;}FR:=BARSLAST(REF(CROSS(EMA34,EMA13),1)) AND CROSS(EMA13,EMA34); {DRAWTEXT(FR,L-0.09,'梅开二度'),COLORWHITE;}DRAWICON(FR,L*0.95,1);个股能量线:=EMA(100*(C-LLV(LOW,34))/(HHV(H,34)-LLV(LOW,34)),3);大盘能量线:=EMA(100*(INDEXC-LLV(INDEXL,34))/(HHV(INDEXH,34)-LLV(INDEXL,34)),3);N:=14;LC:=REF(CLOSE,1);RSI7:=SMA(MAX(CLOSE-LC,0),N,1)/SMA(ABS(CLOSE-LC),N,1)*100,COLORMAGENTA,LIN ETHICK2;G1:=个股能量线>70 AND个股能量线<85 AND RSI7>58.67;G2:=个股能量线>59 AND个股能量线<70;G3:=个股能量线>大盘能量线;{天量}M1:=5;M2:=10;{VVOL:=IF(CURRBARSCOUNT=1 AND PERIOD=5,VOL*240/FROMOPEN,DRAWNULL);} VOLUME:=VOL,VOLSTICK;MAVOL1:=MA(VOLUME,M1);MAVOL2:=MA(VOLUME,M2);VAR2:=1*AMOUNT;MA1:=1*MA(AMOUNT,5);MA2:=1*MA(AMOUNT,10);三十日天量:=HHV(VAR2,30)=VAR2;六十日天量:=HHV(VAR2,60)=VAR2;百日天量:=HHV(VAR2,100)=VAR2;一年天量:=HHV(VAR2,250)=VAR2;TL2:=三十日天量 OR 六十日天量 OR 百日天量 OR 一年天量;{倍量}VVOL:=IF(CURRBARSCOUNT=1 AND PERIOD=5,V*240/FROMOPEN,DRAWNULL);量:=V;倍量:=(V/REF(V,1)>=1.91 AND COUNT(C>O,1)) OR (L>REF(H,1) AND COUNT(O>C,1) AND V/REF(V,1)>=1.91);倍缩:=V<=REF(V,1)*0.5;DRAWICON(TL2=0 AND 倍量=0 AND FR AND ((G1 OR G2 AND G3 )) AND 倍缩=0,H,2); {***************************}{}AA1:=REF(CLOSE,2)<REF(OPEN,2);AA21:=REF(CLOSE,1)<REF(OPEN,1);AA22:=REF(CLOSE,1)>REF(OPEN,1);AA2:=AA21 OR AA22;AA3:=REF(VOL,1)<REF(VOL,2);AA4:=VOL>REF(VOL,2);AA:=AA1 AND AA2 AND AA3 AND AA4;BB1:=VOL/REF(VOL,1)>1.8;BB2:=VOL/REF(VOL,1)<2.5;BB:=BB1 AND BB2;CC:=(CLOSE-REF(CLOSE,1))/REF(CLOSE,1)>0.02;单阳:=AA AND BB AND CC;TJ2:=(V/REF(V,1)>=1.9 AND (C>REF(C,1) OR C>=O)) AND (2.2>=V/REF(V,1) AND (C>REF(C,1) OR C>=O)) ;TJ3:=RANGE(C/REF(C,1),0.999,1.031);JD:=ATAN((MA(C,13)/REF(MA(C,13),1)-1)*100)*57.3;单阳2:=TJ2 AND TJ3 AND JD>8;STICKLINE(单阳,OPEN,CLOSE,1,0),COLORGREEN;高不破价:=REF(C,BARSLAST(单阳));中不破价:=REF((C+L)/2,BARSLAST(单阳));低不破价:=REF(L,BARSLAST(单阳));单阳不破:=CURRBARSCOUNT<100AND BARSLAST(单阳)<11 AND (LLV(L,BARSLAST(单阳))>低不破价 ORLLV(L,BARSLAST(单阳))=低不破价);STICKLINE(单阳不破,低不破价-低不破价*0.003,低不破价,4,0),COLORRED; DRAWTEXT(BARSLAST(单阳)=1AND 单阳不破,低不破价*0.98,'1'),COLORGREEN;DRAWTEXT(BARSLAST(单阳)=2 AND单阳不破,低不破价*0.98,'2'),COLORGREEN;DRAWTEXT(BARSLAST(单阳)=3 AND单阳不破,低不破价*0.98,'3'),COLORGREEN;DRAWTEXT(BARSLAST(单阳)=4 AND单阳不破,低不破价*0.98,'4'),COLORGREEN;DRAWTEXT(BARSLAST(单阳)=5 AND单阳不破,低不破价*0.98,'5'),COLORGREEN;DRAWTEXT(BARSLAST(单阳)=6 AND单阳不破,低不破价*0.98,'6'),COLORGREEN;DRAWTEXT(BARSLAST(单阳)=7 AND单阳不破,低不破价*0.98,'7'),COLORGREEN;DRAWTEXT(BARSLAST(单阳)=8 AND单阳不破,低不破价*0.98,'8'),COLORGREEN;DRAWTEXT(BARSLAST(单阳)=9 AND单阳不破,低不破价*0.98,'9'),COLORGREEN;DRAWTEXT(BARSLAST(单阳)=10 AND单阳不破,低不破价*0.98,'10'),COLORGREEN;{};两天:=LLV(L,BARSLAST(单阳))>低不破价 ORLLV(L,BARSLAST(单阳))=低不破价;较强:=LLV(L,BARSLAST(单阳)-2)>中不破价 OR LLV(L,BARSLAST(单阳)-2)=中不破价;较强选股:STICKLINE(CURRBARSCOUNT<100 AND BARSLAST(单阳)<9 AND 两天 AND 较强,中不破价,中不破价,2,0),COLOR0088FF;最强:=LLV(L,BARSLAST(单阳)-3)>高不破价 OR LLV(L,BARSLAST(单阳)-2)=高不破价; */MX:=EMA(C,2);MXA:=EMA(SLOPE(C,21)*20+C,42);STICKLINE(MX>=MXA,REFX1(HHV(H,130),10000),REFX1(LLV(L,130),10000),5,0),COLOR600020;//STICKLINE(MX//COLOR404050;DRAWKLINE1(H,O,L,C);AA:=ABS((2*CLOSE+HIGH+LOW)/4-MA(CLOSE,30))/MA(CLOSE,30);趋势线:DMA((2*CLOSE+LOW+HIGH)/4,AA),LINETHICK3,COLORRED;CC:=(CLOSE/趋势线);MA1:=MA(CC*(2*CLOSE+HIGH+LOW)/4,3);MAAA:=((MA1-趋势线)/趋势线)/3;TMP:=MA1-MAAA*MA1;JJ:IF(TMP<=趋势线,趋势线,NULL),LINETHICK3,COLORGREEN;XJ:IF(TMP<=趋势线,TMP,NULL),LINETHICK2,COLORBLUE;建仓:CROSS(MX,MXA),NODRAW;SEL:=CROSS(MXA,MX);DRAWICON(建仓,L-0.1,1);DRAWICON(SEL,H+0.1,2);DRAWTEXT(建仓,L-0.68,'↖建仓持股'),COLORMAGENTA;DRAWTEXT(SEL,H+0.38,'↙清仓持币'),COLORBLUE;STICKLINE(MX>=MXA,LOW,HIGH,0.0,1),COLORRED;STICKLINE(MX>=MXA,CLOSE,OPEN,3,1),COLORRED;//STICKLINE(MX//STICKLINE(MXSTICKLINE(建仓,OPEN,CLOSE,2,0),COLORYELLOW;STICKLINE(SEL,OPEN,CLOSE,2,0),COLORBLUE;CP:=MA(CLOSE,9),COLORCYAN,LINETHICK1;JD:=MA(CLOSE,18),COLORMAGENTA;DRAWICON(CROSS(CP,JD) AND MX>=MXA,JD-0.1,1);DRAWTEXT(CROSS(CP,JD) AND MX>=MXA,JD-0.38,'↖加仓'),COLORYELLOW; BL:=VOL>=REF(V,1)*1.91 AND C>REF(C,1)*1.01;DRAWTEXT(FILTER(BL,3),H+0.2,'↙倍量柱'),COLORYELLOW;STICKLINE(FILTER(BL,3),OPEN,CLOSE,1.5,0),COLORYELLOW;XG:=SUMBARS(FILTER(BL,3),1);STICKLINE(XG,REF(L,XG-1),REF(L,XG-1),10,0),COLORYELLOW;。

期货界最精准文华财经指标公式源码

期货界最精准文华财经指标公式源码

期货界最精准文华财经指标公式源码
欢迎使用文华财经指标公式源码文档。

本文档旨在为您提供关于期货界最精准文华财经指标公式的详细信息。

以下是指标公式源码及相关说明。

指标公式源码
示例指标公式:文华财经最精准指标
def wh_finance_indicator(data):
计算指标值
indicator_value = sum(data) / len(data)
return indicator_value
说明
1. 函数名称:`wh_finance_indicator`
- 该函数用于计算文华财经最精准指标的值。

- 输入参数:`data`,表示需要计算指标的数据列表。

- 返回值:`indicator_value`,表示计算得到的指标值。

2. 指标计算:
- 本示例指标公式计算的是数据列表的平均值。

- 您可以根据实际需求,对公式进行修改和调整,以实现更精准的指标计算。

3. 使用方法:
- 将上述代码复制到您的编程环境中。

- 根据实际需求,修改输入参数 `data`。

- 运行代码,获取指标值 `indicator_value`。

注意事项
1. 在使用指标公式时,请确保您了解指标的计算原理和适用场景。

2. 根据实际需求,调整公式中的计算逻辑。

3. 如果您在使用过程中遇到问题,请随时查阅相关文档或咨询技术支持。

希望这份文档能够帮助您更好地理解和使用期货界最精准文华财经指标公式。

祝您在使用过程中取得优秀的交易成果!。

文华财经指标公式源码文华期货软件指标公式公式源码

文华财经指标公式源码文华期货软件指标公式公式源码

/*拉升力:=(CLOSE-LLV(LOW,28))/(HHV(HIGH,30)-LLV(LOW,36))*0.6*CLOSE; 拉升力A:=SMA(拉升力,6.3,1);波峰波谷:SMA(拉升力A,3,1),COLORFF00FF;拉升力B:=3*拉升力A-2.1*波峰波谷;空方:=3*波峰波谷-1* 拉升力A;做空:IF(空方>拉升力B,拉升力B,空方),LINETHICK2,COLOR00FF00;做空周期:HHV(做空,21),COLORBLUE,LINETHICK2;多头:IF(做空>=REF(做空,1) ,做空,DRAWNULL),COLORRED,LINETHICK3; DRAWICON(做空>=REF(做空,1) AND REF(做空,1)<REF(做空,2),做空,23);空头:IF(做空<REF(做空,1),做空,DRAWNULL),COLORGREEN,LINETHICK3; {DRAWICON(做空<=REF(做空,1) AND REF(做空,1)>REF(做空,2),做空,19);} 短线:(CLOSE-MA(CLOSE,13))/MA(CLOSE,13)*20,LINETHICK0,COLORWHITE; 中线:(CLOSE-MA(CLOSE,4))/MA(CLOSE,4)*20,LINETHICK0,COLORYELLOW;红柱:SMA(短线,3,1),LINETHICK0,COLOR0000FF;蓝柱:SMA(中线,3,1),COLORSTICK,COLORFFFF00;{红柱}STICKLINE(红柱<REF(红柱,1)AND 红柱>0,0,红柱,2,0),COLOR888800; STICKLINE(红柱<REF(红柱,1)AND 红柱>0,0,红柱,1.5,0),COLORAAAA00; STICKLINE(红柱<REF(红柱,1)AND 红柱>0,0,红柱,0.8,0),COLORDDDD00; STICKLINE(红柱<REF(红柱,1)AND 红柱>0,0,红柱,0.3,0),COLORFFFF00; STICKLINE(红柱>REF(红柱,1)AND 红柱>0,0,红柱,2,0),COLOR000088; STICKLINE(红柱>REF(红柱,1)AND 红柱>0,0,红柱,1.5,0),COLOR0000AA; STICKLINE(红柱>REF(红柱,1)AND 红柱>0,0,红柱,0.8,0),COLOR0000DD; STICKLINE(红柱>REF(红柱,1)AND 红柱>0,0,红柱,0.3,0),COLOR0000FF; STICKLINE(蓝柱<REF(蓝柱,1) AND 蓝柱>0,0,蓝柱,2,0),COLOR008800; STICKLINE(蓝柱<REF(蓝柱,1) AND 蓝柱>0,0,蓝柱,1,0),COLOR00AA00; STICKLINE(蓝柱<REF(蓝柱,1) AND 蓝柱>0,0,蓝柱,0.8,0),COLOR00DD00; STICKLINE(蓝柱<REF(蓝柱,1) AND 蓝柱>0,0,蓝柱,0.3,0),COLOR00FF00;{蓝柱}STICKLINE(红柱>REF(红柱,1)AND 红柱<0,0,红柱,2,0),COLOR880088;STICKLINE(红柱>REF(红柱,1)AND 红柱<0,0,红柱,1.5,0),COLORAA00AA; STICKLINE(红柱>REF(红柱,1)AND 红柱<0,0,红柱,0.8,0),COLORDD00DD; STICKLINE(红柱>REF(红柱,1)AND 红柱<0,0,红柱,0.3,0),COLORFF00FF; STICKLINE(红柱<REF(红柱,1)AND 红柱<0,0,红柱,2,0),COLOR888800; STICKLINE(红柱<REF(红柱,1)AND 红柱<0,0,红柱,1.5,0),COLORAAAA00; STICKLINE(红柱<REF(红柱,1)AND 红柱<0,0,红柱,0.8,0),COLORDDDD00; STICKLINE(红柱<REF(红柱,1)AND 红柱<0,0,红柱,0.3,0),COLORFFFF00; STICKLINE(蓝柱>REF(蓝柱,1)AND 蓝柱<0,0,蓝柱,2,0),COLOR009999; STICKLINE(蓝柱>REF(蓝柱,1)AND 蓝柱<0,0,蓝柱,1.5,0),COLOR00BBBB; STICKLINE(蓝柱>REF(蓝柱,1)AND 蓝柱<0,0,蓝柱,0.8,0),COLOR00DDDD; STICKLINE(蓝柱>REF(蓝柱,1)AND 蓝柱<0,0,蓝柱,0.3,0),COLOR00FFFF;VAR200:=(CLOSE-LLV(LOW,20))/(HHV(HIGH,20)-LLV(LOW,20))*100;VAR300:=SMA(SMA(VAR200,3,1),3,1)/28.57;VAR400:=EMA(VAR300,5);B1:=(CLOSE-MA(CLOSE,6))/MA(CLOSE,6)*100;B2:=(CLOSE-MA(CLOSE,13))/MA(CLOSE,13)*100;B3:=(CLOSE-MA(CLOSE,20))/MA(CLOSE,20)*100;B4:=(CLOSE-MA(CLOSE,30))/MA(CLOSE,30)*100;M:=(LOW+HIGH+CLOSE)/3;HD:=(HIGH - REF(HIGH,1));LD:=(REF(LOW,1) - LOW);DMP:=(SUM(IF(((HD>0) AND (HD>LD)),HD,0),5) );DMM:=SUM(IF(((LD>0) AND (LD>HD)),LD,0),5);STX:=(((DMP)*100)/TR);FZX:=((DMM*100)/TR);XXX:=(MA(((ABS((FZX-STX))/(FZX+STX)) * 100),3));WJDB:=IF(((XXX>88) AND (STX<5.8)),25,0);DRAWICON(WJDB=25,-5,9);STICKLINE(B1<-7,5,0,3,0),COLOR0099FF;STICKLINE(B2<-9,10,0,2.2,0),COLOR0066FF;STICKLINE(B3<-11,15,0,1.4,0),COLOR0033FF;STICKLINE(B4<-13,20,0,0.6,0),COLOR0000FF;DRAWTEXT(B1<-7 AND B2<-9 AND B3<-11 AND B4<-13,18,'超跌'),COLORYELLOW; STICKLINE(B1>10,0,-5,3,0),COLORFFFF33;STICKLINE(B2>15,0,-10,2.2,0),COLORFFCC00;STICKLINE(B3>20,0,-15,1.4,0),COLORFF9933;STICKLINE(B4>25,0,-20,0.6,0),COLORFF6633;DRAWTEXT(B1>10 AND B2>15 AND B3>20 AND B4>25,-18,'预警'),COLORYELLOW; BL:(B1+B2+B3+B4)/2,LINETHICK2,COLORFF00FF;BLMA:MA(BL,6),LINETHICK2,COLORCC0000;DRAWTEXT(BL>50,BL-2,'◆谨慎'),COLORYELLOW;DRAWTEXT(BL<-35,BL+2,'◆关注'),COLORYELLOW;操盘:=3*VAR300-2*VAR400;A1:=CROSS(操盘,VAR300) AND VAR300<2.1 AND C>O;STICKLINE(A1,5,0,4,0),COLOR770077;STICKLINE(A1,5,0,3,0),COLOR990099;STICKLINE(A1,5,0,2,0),COLORBB00BB;STICKLINE(A1,5,0,1,0),COLORDD00DD;STICKLINE(A1,5,0,0.3,0),COLORFF00FF;DRAWTEXT(A1,5.2,'全仓买入'),COLORRED;*/S:=CROSS(CLOSE,EMA(HIGH,30));X:=CROSS(EMA(LOW,30),CLOSE);WS:=BARSLAST(S)+1;WX:=BARSLAST(X)+1;SS:=CROSS(SUM(S,WX),0.5);XX:=CROSS(SUM(X,WS),0.5);STICKLINE1(CLOSE>EMA(HIGH,30),EMA(HIGH,30),EMA(LOW,30),1,1),COLORRED; STICKLINE1(CLOSE<EMA(LOW,30),EMA(LOW,30),EMA(HIGH,30),1,1),COLORGREEN; STICKLINE1(CLOSE>EMA(HIGH,150),EMA(HIGH,150),EMA(LOW,150),1,1),COLORMAGENTA; STICKLINE1(CLOSE<EMA(LOW,150),EMA(LOW,150),EMA(HIGH,150),1,1),COLORBLUE; PARTLINE1(CLOSE>EMA(HIGH,30),EMA(HIGH,30)),COLORRED;PARTLINE1(CLOSE<EMA(HIGH,30),EMA(HIGH,30)),COLORGREEN;PARTLINE1(CLOSE>EMA(LOW,30),EMA(LOW,30)),COLORRED;PARTLINE1(CLOSE<EMA(LOW,30),EMA(LOW,30)),COLORGREEN;PARTLINE1(CLOSE>EMA(HIGH,150),EMA(HIGH,150)),COLORMAGENTA;PARTLINE1(CLOSE<EMA(HIGH,150),EMA(HIGH,150)),COLORBLUE;PARTLINE1(CLOSE>EMA(LOW,150),EMA(LOW,150)),COLORMAGENTA;PARTLINE1(CLOSE<EMA(LOW,150),EMA(LOW,150)),COLORBLUE;DRAWTEXT(SS,LOW*0.965,'B'),COLORRED;DRAWICON(SS,LOW*0.98,8);DRAWTEXT(XX,HIGH*1.035,'S'),COLORGREEN;DRAWICON(XX,HIGH*1.02,9);。

文华期货软件指标公式期货持仓量指标代码公式源码

文华期货软件指标公式期货持仓量指标代码公式源码

/*AA:=IF(CURRBARSCOUNT=1 AND PERIOD=5,VOL*240/FROMOPEN,DRAWNULL);预测:AA/10000;BB:=VOL/((HIGH-LOW)*2-ABS(CLOSE-OPEN));主动买:=IF(CLOSE>OPEN,BB*(HIGH-LOW),IF(CLOSE<OPEN,BB*((HIGH-OPEN)+(CLOSE-LO W)),VOL/2));主买:主动买/10000,COLORRED;主动卖:=IF(CLOSE>OPEN,0-BB*((HIGH-CLOSE)+(OPEN-LOW)),IF(CLOSE<OPEN,0-BB*(HIGH -LOW),0-VOL/2));主卖:-主动卖/10000,COLORGREEN;差额:(主动买+主动卖)/10000;STICKLINE(CLOSE=REF(CLOSE,1),0,VOL,3.5,0),COLORWHITE;STICKLINE(CLOSE>REF(CLOSE,1),0,VOL,3.5,0),COLORRED;STICKLINE(CLOSE<REF(CLOSE,1),0,VOL,3.5,0),COLORGREEN;STICKLINE(CURRBARSCOUNT=1 AND PERIOD=5,AA,1 , 3.5 , 0 ) , COLOR00FFFF ; STICKLINE(CURRBARSCOUNT=1 AND PERIOD=5,AA,1 , 3.2 , 0 ) , COLOR007777 ; STICKLINE(CURRBARSCOUNT=1 AND PERIOD=5,AA,1 , 2.7 , 0 ) , COLOR009999 ; STICKLINE(CURRBARSCOUNT=1 AND PERIOD=5,AA,1 , 2.1 , 0 ) , COLOR00BBBB ; STICKLINE(CURRBARSCOUNT=1 AND PERIOD=5,AA,1 , 1.5 , 0 ) , COLOR00DDEE ; STICKLINE(CURRBARSCOUNT=1 AND PERIOD=5,AA,1 , 0.9 , 0 ) , COLOR66FFFF ; STICKLINE(CURRBARSCOUNT=1 AND PERIOD=5,AA,1 , 0.2 , 0 ) , COLORFFFFFF ; STICKLINE(主动买>=0,VOL,-主动卖,3.2,0),COLOR000033;STICKLINE(主动买>=0,VOL,-主动卖,2.7,0),COLOR000066;STICKLINE(主动买>=0,VOL,-主动卖,2.1,0),COLOR000099;STICKLINE(主动买>=0,VOL,-主动卖,1.5,0),COLOR0000CC;STICKLINE(主动买>=0,VOL,-主动卖,0.9,0),COLOR0000FF;STICKLINE(主动买>=0,VOL,-主动卖,0.2,0),COLORCC66FF;STICKLINE(主动卖<=0,0,-主动卖,3.2,0),COLOR990000;STICKLINE(主动卖<=0,0,-主动卖,2.7,0),COLORCC0000;STICKLINE(主动卖<=0,0,-主动卖,2.1,0),COLORFF4400;STICKLINE(主动卖<=0,0,-主动卖,1.5,0),COLORFF8800;STICKLINE(主动卖<=0,0,-主动卖,0.9,0),COLORFFCC00;STICKLINE(主动卖<=0,0,-主动卖,0.2,0),COLORCYAN;持币:IF(SAR(10,2,20)>=H,SAR(10,2,20),DRAWNULL),COLOR00FF00,LINETHICK6;持股:IF(SAR(10,2,20)<=L,SAR(10,2,20),DRAWNULL),COLORRED,LINETHICK6;换手率%:100*VOL/(FINANCE(7)/100)COLORYELLOW,NODRAW;低迷:IF(换手率%<=1,换手率%,DRAWNULL),COLORFF9900,NODRAW;温和:IF(换手率%>1 && 换手率%<=3,换手率%,DRAWNULL),COLORBBBBBB,NODRAW;异动:IF(换手率%>3 && 换手率% <=5,换手率%,DRAWNULL),NODRAW;活跃:IF(换手率%>5 && 换手率%<=8,换手率%,DRAWNULL)COLORMAGENTA,NODRAW; 非常活跃:IF(换手率%>8 && 换手率%<=10,换手率%,DRAWNULL)COLORYELLOW,NODRAW;高度活跃:IF(换手率%>10 && 换手率%<=15,换手率%,DRAWNULL)COLOR0077FF,NODRAW;极度活跃:IF(换手率%>15 && 换手率%<=25,换手率%,DRAWNULL)COLORRED,NODRAW; 巨量换手:IF(换手率%>25,换手率%,DRAWNULL)COLOR000099,NODRAW;STICKLINE(低迷,换手率%,0,2.8,0),COLORFF0000;{低迷蓝色}STICKLINE(低迷,换手率%,0,2.3,0),COLORFF3300;STICKLINE(低迷,换手率%,0,1.7,0),COLORFF5500;STICKLINE(低迷,换手率%,0,1.0,0),COLORFF7700;STICKLINE(低迷,换手率%,0,0.3,0),COLORFF9900;STICKLINE(温和,换手率%,0,2.8,0),COLOR555555;{温和灰色}STICKLINE(温和,换手率%,0,2.3,0),COLOR777777;STICKLINE(温和,换手率%,0,1.7,0),COLOR999999;STICKLINE(温和,换手率%,0,1.0,0),COLORBBBBBB;STICKLINE(温和,换手率%,0,0.3,0),COLORDDDDDD;STICKLINE(异动,换手率%,0,2.8,0),COLOR004400;{异动绿色}STICKLINE(异动,换手率%,0,2.3,0),COLOR006600;STICKLINE(异动,换手率%,0,1.7,0),COLOR009900;STICKLINE(异动,换手率%,0,1.0,0),COLOR00CC00;STICKLINE(异动,换手率%,0,0.3,0),COLOR00FF00;STICKLINE(活跃,换手率%,0,2.8,0),COLOR880088;{活跃粉色}STICKLINE(活跃,换手率%,0,2.3,0),COLORAA00AA;STICKLINE(活跃,换手率%,0,1.7,0),COLORCC00CC;STICKLINE(活跃,换手率%,0,1.0,0),COLOREE00EE;STICKLINE(活跃,换手率%,0,0.3,0),COLORFF33FF;STICKLINE(非常活跃,换手率%,0,2.8,0),COLOR008888;{非常活跃黄色} STICKLINE(非常活跃,换手率%,0,2.3,0),COLOR00AAAA;STICKLINE(非常活跃,换手率%,0,1.7,0),COLOR00CCCC;STICKLINE(非常活跃,换手率%,0,1.0,0),COLOR00EEEE;STICKLINE(非常活跃,换手率%,0,0.3,0),COLOR44FFFF;STICKLINE(高度活跃,换手率%,0,2.8,0),COLOR0000AA;{高度活跃橘红} STICKLINE(高度活跃,换手率%,0,2.3,0),COLOR0022CC;STICKLINE(高度活跃,换手率%,0,1.7,0),COLOR0044DD;STICKLINE(高度活跃,换手率%,0,1.0,0),COLOR0055FF;STICKLINE(高度活跃,换手率%,0,0.3,0),COLOR0099FF;STICKLINE(极度活跃,换手率%,0,2.8,0),COLOR000066;{极度活跃红色} STICKLINE(极度活跃,换手率%,0,2.3,0),COLOR000088;STICKLINE(极度活跃,换手率%,0,1.7,0),COLOR0000AA;STICKLINE(极度活跃,换手率%,0,1.0,0),COLOR0000CC;STICKLINE(极度活跃,换手率%,0,0.3,0),COLOR2222FF;STICKLINE(巨量换手,换手率%,0,2.8,0),COLOR000022;{巨量换手酱红色} STICKLINE(巨量换手,换手率%,0,2.3,0),COLOR000033;STICKLINE(巨量换手,换手率%,0,1.7,0),COLOR000055;STICKLINE(巨量换手,换手率%,0,1.0,0),COLOR000077;STICKLINE(巨量换手,换手率%,0,0.3,0),COLOR000099;*/REFLINE: 0, 20, 50, 80, 100;RSV1:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100;KK:=SMA(RSV1,3,1);DD:=SMA(KK,3,1),LINETHICK1,COLORMAGENTA;RSV2:=(CLOSE-LLV(LOW,27))/(HHV(HIGH,27)-LLV(LOW,27))*100;趋势线:=3*SMA(RSV2,5,1)-2*SMA(SMA(RSV2,5,1),3,1),LINETHICK2,COLORCYAN;K:=SMA(RSV2,3,1);D:=SMA(K,3,1);STICKLINE1(K>50,D,K,1,0),COLORYELLOW;STICKLINE1(K<50,D,K,1,0),COLORBLUE;强弱界线:50,CIRCLEDOT,LINETHICK1,COLOR9966CC;见顶信号:=100,COLORCCFF00;短线卖出: =IF(CROSS(DD,KK) AND DD>85,70,100),LINETHICK2,COLOR00FF00;买入准备:=IF(趋势线<=10,40,0),LINETHICK2,COLORYELLOW;STICKLINE(趋势线>88,90,趋势线,3,1),COLORGREEN;//STICKLINE(趋势线<=10,0,趋势线,5,1),COLORYELLOW;STICKLINE1(COUNT(趋势线<REF(趋势线,1) AND 趋势线<10,2)=2 ,10,20,3,0),COLORRED; STICKLINE1(CROSS(DD,KK) AND DD>85,90,80,3,0),COLORGREEN;//DRAWICON(FILTER(CROSS(D,K) AND D>81,10),D*1.05,2);//DRAWTEXT(CROSS(K,D) AND CROSS(KK,DD),20,'共振点'),COLOR00FFFF; 共振点:=(CROSS(K,D) AND CROSS(KK,DD));//STICKLINE(共振点>0,0,100,0,0),COLORYELLOW;抄底:=共振点AND D<20,NODRAW;。

文华财经软件-期货界最准确指标公式源码

文华财经软件-期货界最准确指标公式源码

文华财经软件-期货界最准确指标公式源码概述文华财经软件是一款广泛应用于期货市场的专业分析工具,其包含了丰富的技术指标和公式,以帮助投资者做出更精准的交易决策。

本文档将详细介绍文华财经软件中一些被认为是最准确的指标公式源码,旨在为专业投资者和分析师提供深度的技术分析能力。

指标公式概览以下是一些在文华财经软件中应用广泛的指标公式源码,它们为用户提供了多角度的市场分析。

移动平均线(MA)移动平均线是最常用的技术指标之一,它通过计算一定时间段内的平均价格来展示市场趋势。

常用源码示例def calculate_ma(prices, window_size):return sum(prices[-window_size:]) / window_size使用示例prices = [关闭价格1, 关闭价格2, ..., 关闭价格N]window_size = 10 # 例如,使用10日移动平均线ma = calculate_ma(prices, window_size)相对强弱指数(RSI)相对强弱指数是一个动量指标,用来评估股票或其他资产过度买入或过度卖出的情况。

RSI计算的简化版源码示例def calculate_rsi(price_changes, window_size):计算平均变化avg_gain = sum(change for change in price_changes if change > 0) / window_sizeavg_loss = sum(abs(change) for change in price_changes if change < 0) / window_size计算RSrs = avg_gain / avg_loss if avg_loss != 0 else 0计算RSIrsi = 100 - (100 / (1 + rs))return rsi使用示例price_changes = [价格变化1, 价格变化2, ..., 价格变化N]window_size = 14 # 例如,使用14日RSIrsi_value = calculate_rsi(price_changes, window_size)布林带(Bollinger Bands)布林带是由标准差定义的通道,它围绕移动平均线,可以用来衡量市场的波动性。

期货程序化交易之文华指标公式源码

期货程序化交易之文华指标公式源码

期货程序化交易之文华指标公式源码1. 平均真实波动范围(Average True Range,ATR)```pythondef atr(close_price, high_price, low_price, n=14):tr = []for i in range(len(close_price)):tr.append(max(high_price[i] - low_price[i], abs(high_price[i] - close_price[i-1]), abs(low_price[i] - close_price[i-1]))) atr = sum(tr)/nreturn atr```平均真实波动范围是衡量市场波动性的指标,它计算了最高价和最低价之间的波动范围,并取一定周期内的平均值。

2. 相对强弱指标(Relative Strength Index,RSI)```pythondef rsi(close_price, n=14):rsi = []for i in range(len(close_price)):if i < n:rsi.append(None)else:gains = 0losses = 0for j in range(n):change = close_price[i-j] - close_price[i-j-1]if change > 0:gains += changeelse:losses += abs(change)avg_gain = gains / navg_loss = losses / nrs = avg_gain / avg_lossrsi.append(100 - (100 / (1 + rs)))return rsi```相对强弱指标是衡量市场超买超卖情况的指标,它计算了一段时间内收盘价上涨和下跌的平均值,并通过计算相对强度来衡量买卖力量的强弱。

文华财经期货指标公式源码极高胜率交易系统公式源码

文华财经期货指标公式源码极高胜率交易系统公式源码

/*VAR1:=(H+L+O+3*C)/6;WLT:=EMA(VAR1,3);WLTA:=EMA(WLT,1),COLORFFFFFF;空:HHV(MA(H,3),2),LINETHICK2,COLOR00DD00;多:LLV(MA(H,3),1),LINETHICK2,COLOR0000DD;JCBT:=LAST(多<空,9,1) AND 多=空;STICKLINE(JCBT,O,(O+C)/2,4,0),COLOR0000FF;DRAWTEXT(JCBT,L*0.98,'短B'),COLOR0000FF;{超跌反弹买点}VARA:=(C-REF(O,21))/REF(O,21)*100;VARB:=EMA(0.667*REF(VARA,1)+0.333*VARA,5);WLBT1:=V>=1.3*MA(V,5) AND REF(L,1)=LLV(L,55) AND VARA>=VARB AND VARA<-6.18; WLBT2:=V>=1.3*MA(V,5) AND CROSS(VARA,VARB) AND VARA<-10.18;WLBT:=WLBT1 OR WLBT2;DRAWTEXT(WLBT,L*0.98,'反弹'),COLOR00FFFF;STICKLINE(WLBT,C,O,3,0),COLOR00FFFF;{卖点设置}S1:=EMA(EMA(EMA(C,8),13),55);S2:=(REF(H,1)+REF(L,1))/2;S3:=MA(C,21)+2*STD(C,21);ST11:=CROSS(S2,S3);S4:=REF(C,1);S5:=SMA(MAX(C-S4,0),7,1)/SMA(ABS(C-S4),7,1)*100;S6:=CROSS(80,S5);ST2:=FILTER(S6,5);V1:=EMA(EMA(EMA(C,8),13),55);V2:=(REF(H,1)+REF(L,1))/2;V3:=MA(C,21)+2*STD(C,21);V4:=REF(C,1);V5:=SMA(MAX(C-V4,0),7,1)/SMA(ABS(C-V4),7,1)*100;V6:=CROSS(80,V5);ST:=FILTER(V6,5);DRAWICON(ST11,H*1.030,19);DRAWICON(ST2,HIGH*1.033,12);DRAWTEXT(ST OR CROSS(V2,V3),HIGH*1.02,'卖'),COLORGREEN;{乖离共振买点}BIAS6:=(C-MA(C,6))/MA(C,6)*100;BIAS12:=(C-MA(C,12))/MA(C,12)*100;BIAS24:=(C-MA(C,24))/MA(C,24)*100;TJ1:=BIAS6<=-8;TJ2:=BIAS12<=-12;TJ3:=BIAS24<=-18;BBT:=(TJ1 AND TJ2 AND TJ3) OR (TJ1 AND TJ2 ) OR (TJ1 AND TJ3);BTJ5:=CROSS(BIAS6,-10);BTJ6:=CROSS(BIAS6,-6.2);BIASXG:=FILTER(BBT OR BTJ5 OR BTJ6,3);STICKLINE(BIASXG,C,O,0.11,0),COLOR0078FF;DRAWTEXT(BIASXG,L*0.98,'BIAS'),COLOR0078FF;{以上3组信号综合或共振买点}WLTBT:=COUNT(WLBT OR JCBT OR BIASXG,2);XG1:=WLTBT>=2;XG:=FILTER(XG1,3);DRAWTEXT(XG,L*0.99,'金牛'),COLOR00FFFF;{选股及成功率统计}年选股:SUM(XG,250),NODRAW;设定利润:=REF(XG,20) AND HHV(H,20)>=REF(C,20)*1.15;{20个交易日内涨15%} 成功数:SUM(设定利润,250),NODRAW;成功率%:成功数/年选股*100,NODRAW;{基本面技术面数据解盘}套牢盘%:=100*(1-WINNER(C));获利盘%:=100*WINNER(C);集中度90%:=(COST(95)-COST(5))/(COST(100))*100;集中度70%:=(COST(85)-COST(15))/(COST(100))*100;平均成本:=COST(50);主力成本:=COST(5);最高:=HHV(H,21);最低:=LLV(L,21);PT:=REF(HIGH,1)-REF(LOW,1);中价:=(H+L+C)/3;近高:=2*中价-LOW;近低:=2*中价-HIGH;短期压力:=中价+PT;短期支撑:=中价-PT;DRAWTEXT_FIX(1,0.02,0.00,0,'【获利盘%】'),COLORRED;DRAWTEXT_FIX(1,0.02,0.06,0,'【套牢盘%】'),COLOR00FF00;DRAWTEXT_FIX(1,0.02,0.12,0,'【90%成本】'),COLORYELLOW;DRAWTEXT_FIX(1,0.02,0.18,0,'【70%成本】'),COLOR008FFF;DRAWTEXT_FIX(1,0.02,0.24,0,'【平均成本】'),COLORFF99FF;DRAWTEXT_FIX(1,0.02,0.30,0,'【主力成本】'),COLORFF00FF;DRAWTEXT_FIX(1,0.02,0.36,0,'【短期压力】'),COLORFFFFBF;DRAWTEXT_FIX(1,0.02,0.42,0,'【短期支撑】'),COLORF0F000;DRAWTEXT_FIX(1,0.3,0.00,0,'【中价】'),COLORWHITE;DRAWTEXT_FIX(1,0.3,0.06,0,'【近高】'),COLORFFFFBF;DRAWTEXT_FIX(1,0.3,0.12,0,'【近低】'),COLORF0F000;DRAWTEXT_FIX(1,0.3,0.18,0,'【最高】'),COLORFF99FF;DRAWTEXT_FIX(1,0.3,0.24,0,'【最低】'),COLORFF00FF;DRAWNUMBER_FIX(1,0.16,0.00,0,CONST(获利盘%)),COLORRED;DRAWNUMBER_FIX(1,0.16,0.06,0,CONST(套牢盘%)),COLOR00FF00; DRAWNUMBER_FIX(1,0.16,0.12,0,CONST(集中度90%)),COLORYELLOW; DRAWNUMBER_FIX(1,0.16,0.18,0,CONST(集中度70%)),COLOR008FFF; DRAWNUMBER_FIX(1,0.16,0.24,0,CONST(平均成本)),COLORFF99FF; DRAWNUMBER_FIX(1,0.16,0.30,0,CONST(主力成本)),COLORFF00FF; DRAWNUMBER_FIX(1,0.16,0.36,0,CONST(短期压力)),COLORFFFFBF; DRAWNUMBER_FIX(1,0.16,0.42,0,CONST(短期支撑)),COLORF0F000; DRAWNUMBER_FIX(1,0.38,0.00,0,CONST(中价)),COLORWHITE;DRAWNUMBER_FIX(1,0.38,0.06,0,CONST(近高)),COLORFFFFBF;DRAWNUMBER_FIX(1,0.38,0.12,0,CONST(近低)),COLORF0F000;DRAWNUMBER_FIX(1,0.38,0.18,0,CONST(最高)),COLORFF99FF;DRAWNUMBER_FIX(1,0.38,0.24,0,CONST(最低)),COLORFF00FF;DRAWTEXT_FIX(1,0.5,0.0,0,'【每股收益 (元)】:'),COLOR0000FF;DRAWNUMBER_FIX(1,0.63,0.00,0,FINANCE(33)),COLOR0000FF;DRAWTEXT_FIX(1,0.5,0.06,0,'【每股净资产(元)】:'),COLOR00FFFF; DRAWNUMBER_FIX(1,0.63,0.06,0,FINANCE(34)),COLOR00FFFF;BHD:=(AMOUNT/C)/HHV((AMOUNT/C),26)*100;DRAWTEXT_FIX(1,0.5,0.12,0,'【量能饱和度℅】:'),COLORFF00FF;DRAWNUMBER_FIX(1,0.63,0.12,0,CONST(BHD)),COLORFF00FF;PSY:=COUNT(C>REF(C,1),34)/34*100;DRAWTEXT_FIX(1,0.5,0.18,0,'【心理乐观度℅】:')COLOR00FF00;DRAWNUMBER_FIX(1,0.63,0.18,0,CONST(PSY)),COLOR00FF00;{五里头操作理念}DRAWTEXT_FIX(1,0.0,0.98,0,'★五里理念★:改掉恶习,严守纪律,趋势为先,波段操作;安全第一,坚决止损! ★:本指标依据:多空转化→【短B】、超跌反弹→【反弹】、*/ MID:=(2.97*CLOSE+LOW+OPEN+HIGH)/6;主力:(20*MID+19*REF(MID,1)+18*REF(MID,2)+17*REF(MID,3)+16*REF(MID,4)+15*REF(MID,5)+14*REF(MID,6)+13*REF(MID,7)+12*REF(MID,8)+11*REF(MID,9)+10*REF(MID,10)+9*REF(MID,11)+8*REF(MID,12)+7*REF(MID,13)+6*REF(MID,14)+5*REF(MID,15)+4*REF(MID,16)+3*REF(MID,17)+2*REF(MID,18)+REF(MID,20))/210,COLORRED,LINETHICK2; DRAWCOLORLINE(主力>REF(主力,1),主力,COLORRED,COLORGREEN),LINETHICK2;。

  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
相关文档
最新文档