您现在的位置:程序化交易>> 期货公式>> 金字塔等>> 金字塔模型>>正文内容

金字塔常见普通图表系统的止损止赢源码[金字塔模型]

相关标签:白银止损与止赢方法,现货止损止赢,期货止损止赢源码,图表辨析与交易系统,海龟交易法则 止赢,图表辨识与交易系统,止损策略,期货交易止损的重要性,黄金交易怎样设止损,

 


模型策略源码:

 

{别忘了将本网告诉您身边的朋友,向朋友传达有用资料,也是一种人情,你朋友会感谢你的。}

 

源码解析:

_HIGH_0赋值:EXTGBDATA(\'LAST_HIGH\')
LAST_LOW_0赋值:EXTGBDATA(\'LAST_LOW\')
KC_PRICE_0赋值:EXTGBDATA(\'KC_PRICE\')
TX_HOLDING_0赋值:EXTGBDATA(\'TX_HOLDING\')
HIGH_0赋值:最高价
CLOSE_0赋值:收盘价
LOW_0赋值:最低价
逻辑判断 TX_HOLDING_0>0 AND HIGH_0>LAST_HIGH_0 THEN EXTGBDATASET(\'LAST_HIGH\',HIGH_0)
逻辑判断 TX_HOLDING_0<0 AND LOW_0<LAST_LOW_0 THEN EXTGBDATASET(\'LAST_LOW\',LOW_0)
LAST_HIGH_0赋值:LAST_HIGH_0+50
赋值:LAST_LOW_0-50
持?(LAST_HIGH_0-KC_PRICE_0)/KC_PRICE_0
拗聘持?1/开多仓后最高涨幅*100+止赢系数的开方
拗聘持?(LAST_HIGH_0-KC_PRICE_0)*开多涨回撤比例限制
拗聘持?LAST_HIGH_0-开多涨回撤幅度限制
PD_TJ_多头止损赋值:TX_HOLDING_0>0  AND     ( CLOSE_0<KC_PRICE_0*(1-止损百分比)  )
PD_TJ_多头止赢赋值:TX_HOLDING_0>0  AND     (  CLOSE_0<开多涨回撤价格限制 )
持?(KC_PRICE_0-LAST_LOW_0)/KC_PRICE_0
拗聘持?1/开空仓后最大跌幅*100+止赢系数的开方
拗聘持?(KC_PRICE_0-LAST_LOW_0)*开空跌回撤比例限制
拗聘持?LAST_LOW_0+开空跌回撤幅度限制
鸶持?TX_HOLDING_0<0  AND     ( CLOSE_0>KC_PRICE_0*(1+止损百分比)  )
PK_TJ_空头止赢赋值:TX_HOLDING_0<0  AND     ( CLOSE_0>开空跌回撤价格限制 )
多头卖出:    PD_TJ_多头止损  OR PD_TJ_多头止赢  ,ORDERQUEUE
空头买入:  PK_TJ_空头止损  OR PK_TJ_空头止赢  ,ORDERQUEUE
多头买入:  KD_TJ    ,ORDERQUEUE       
空头卖出: KK_TJ    ,ORDERQUEUE       
    // 开多 保存全局变量IF ( KD_TJ  AND TX_HOLDING_0<1  ) THEN                                                          BEGIN  EXTGBDATASET(\'LAST_HIGH\',HIGH_0)
                                                             EXTGBDATASET(\'LAST_LOW\',LOW_0)
                                                             EXTGBDATASET(\'TX_HOLDING\',1)
                                                             EXTGBDATASET(\'KC_PRICE\',CLOSE_0)
                                                                                                                  END // 开空 保存全局变量                                                      如果KK_TJANDTX_HOLDING_0>-1,返回?,否则返回? THEN                                                          BEGIN  EXTGBDATASET(\'LAST_HIGH\',HIGH_0)
                                                             EXTGBDATASET(\'LAST_LOW\',LOW_0)
                                                             EXTGBDATASET(\'TX_HOLDING\',-1)
                                                             EXTGBDATASET(\'KC_PRICE\',CLOSE_0)
                                                      END                             // 平多仓后保存全局变量IF (( PD_TJ_多头止损  OR PD_TJ_多头止赢 ) AND TX_HOLDING_0>0 ) THEN                                                                                                                     BEGIN  EXTGBDATASET(\'LAST_HIGH\',1)
                                                                                                                        EXTGBDATASET(\'LAST_LOW\',1)
                                                                                                                        EXTGBDATASET(\'TX_HOLDING\',0)
                                                                                                                        EXTGBDATASET(\'KC_PRICE\',1)
                                                                                                                  END // 平空仓后保存全局变量                                                                                                                  如果(PK_TJ_空头止损ORPK_TJ_空头止赢)ANDTX_HOLDING_0<0,返回?,否则返回?   THEN                                                                                                                     BEGIN  EXTGBDATASET(\'LAST_HIGH\',1)
                                                                                                                        EXTGBDATASET(\'LAST_LOW\',1)
                                                                                                                        EXTGBDATASET(\'TX_HOLDING\',0)
                                                                                                                        EXTGBDATASET(\'KC_PRICE\',1)
                                                                                                                  END
 

 

有思路,想编写各种指标公式,程序化交易模型,选股公式,预警公式的朋友

可联系技术人员 QQ: 262069696  点击在线交流进行 有偿 编写!不贵!点击查看价格!

 


【字体: 】【打印文章】【查看评论

相关文章

    没有相关内容