77范文网 - 专业文章范例文档资料分享平台

国外五大股票交易系统,及其源码(4)

来源:网络收集 时间:2019-02-15 下载这篇文档 手机版
说明:文章内容仅供预览,部分内容可能不全,需要完整文档或者需要复制内容,请下载word后使用。下载word有问题请添加微信号:或QQ: 处理(尽可能给您提供完整文档),感谢您的支持与谅解。点击这里给我发消息

} // 当前多头,要求反转为空头 if(sc) {

if(BarStatus==2)tradePrice= Q_BidPrice -splitDot; Else tradePrice=ll-splitDot;

// 平多头开空

SellShort(maxLots,tradePrice); } //持仓处理,止损止盈平仓 //........ }

//----------------------------------------------------------------------------------------------- Else

if(MarketPosition < 0 ) {

// 当前空仓,加空头

If(sc And BarsSinceLastEntry>minSpt) {

if(BarStatus==2)tradePrice= -splitDot; Else tradePrice=ll-splitDot;

SellShort(maxLots,tradePrice); } // 当前空头,要求反转为多头 if(bc) {

if(BarStatus==2) Q_AskPrice +splitDot; Else tradePrice=hh+splitDot; //平空头,开多

Buy(maxLots,tradePrice);

}

//持仓处理,止损止盈平仓 //........ }

} } End

//------------------------------------------------------------------------ // 编译版本 GS2004.06.12 // 用户版本 2008/11/18 18:49 // 版权所有 fish0451

Q_BidPrice tradePrice= // 更改声明 TradeBlazer Software保留对TradeBlazer平台

// 每一版本的TrabeBlazer公式修改和重写的权利 //------------------------------------------------------------------------

网友回复:

2定义时间段内高低点的函数: vars

NumericSeries TmpHiLine; Begin

If(Date!=Date[1]) {

TmpHiLine = InvalidNumeric; }else {

TmpHiLine = TmpHiLine[1]; }

If(Time >= 0.1100 && Time <= 0.1120) {

If(TmpHiLine == InvalidNumeric ) TmpHiLine = High; else

TmpHiLine = max(High,TmpHiLine ); }

PlotNumeric(\End

一个30分钟突破的日内系统

这个系统我认为缺乏一个有效的过滤器会造成很多无效突破,在过滤器中最简单有效的是交易时段过滤器正如我前面提到的有效突破总是集中在一天中的某一时段呈正态分布向两边展开。通过时间过滤器可以大大提高系统的成功率和稳定性。希望高手添加一下。

Params

Numeric nMins(30); // N分钟的突破

Numeric nOffset(3); // 突破式的价格偏移 Vars

NumericSeries HighestOf30Min; NumericSeries lowestOf30Min; Numeric myPrice; Numeric MinPoint; Numeric lots(1); Begin

MinPoint = MinMove*PriceScale; If(Date <> Date[1]) {

HighestOf30Min = High; lowestOf30Min = Low;

}Else If(Time < 0.0900+nMins*0.0001) {

HighestOf30Min = max(high,HighestOf30Min[1]); lowestOf30Min = min(Low,lowestOf30Min[1]); }Else {

HighestOf30Min = HighestOf30Min[1]; lowestOf30Min = lowestOf30Min[1]; }

If(High >= HighestOf30Min + nOffset*MinPoint && MarketPosition != 1) {

myPrice = HighestOf30Min + nOffset*MinPoint; If(Open > myPrice) myPrice = Open; Buy(lots,myPrice); }

If(Low <= lowestOf30Min - nOffset*MinPoint && MarketPosition != -1) {

myPrice = lowestOf30Min - nOffset*MinPoint; If(Open < myPrice) myPrice = Open; SellShort(lots,myPrice); }

If(Time >= 0.1459) {

Sell(lots,Open);

BuyToCover(lots,Open); } End

开拓者thermostat系统源码

源码内容:

inputs:

bollingerlengths(50), trendliqlength(50), numstddevs(2), swingprcnt1(0.50), swingprcnt2(0.75), atrlength(10),

swingtrendswitch(20); vars:

cmival(0),

buyeasierday(0), selleasierday(0), trendlokbuy(0), trendloksell(0), keyofday(0), swingbuypt(0), swingsellpt(0), trendbuypt(0), trendsellpt(0), swingprotstop(0);

cmival=choppymarketindex(30); buyeasierday=0; selleasierday=0;

trendlokbuy=average(low,3); trendloksell=average(high,3);

keyofday=(high+low+close)/3;

if(close>keyofday) then selleasierday=1; if(close<=keyofday) then buyeasierday=1;

if(buyeasierday=1) then begin

swingbuypt=open of tomorrow + swingprcnt1*avgtruerange(atrlength); swingsellpt=open of tomorrow - swingprcnt2*avgtruerange(atrlength);

end;

if(selleasierday=1) then begin

swingbuypt=open of tomorrow + swingprcnt2*avgtruerange(atrlength); swingsellpt=open of tomorrow - swingprcnt1*avgtruerange(atrlength); end;

swingbuypt=maxlist(swingbuypt,trendlokbuy); swingsellpt=minlist(swingsellpt,trendloksell);

trendbuypt=bollingerband(close,bollingerlengths,numstddevs); trendsellpt=bollingerband(close,bollingerlengths,-numstddevs);

if(cmival

if(marketposition<>1) then buy(\ stop;

if(marketposition<>-1) then sellshort(\ swingsellpt stop; end else begin

swingprotstop=3*avgtruerange(atrlength); buy(\ sellshort(\

sell from entry(\ stop;

buytocover from entry(\ average(close,trendliqlength) stop;

sell from entry(\ stop;

buytocover from entry(\ swingprotstop stop; end;

开拓者盈多亏交易策略源码

简称: JY

// 名称:盈多亏少 // 类别: 公式应用 // 类型: 用户应用

//------------------------------------------------------------------------

Params

百度搜索“77cn”或“免费范文网”即可找到本站免费阅读全部范文。收藏本站方便下次阅读,免费范文网,提供经典小说综合文库国外五大股票交易系统,及其源码(4)在线全文阅读。

国外五大股票交易系统,及其源码(4).doc 将本文的Word文档下载到电脑,方便复制、编辑、收藏和打印 下载失败或者文档不完整,请联系客服人员解决!
本文链接:https://www.77cn.com.cn/wenku/zonghe/465631.html(转载请注明文章来源)
Copyright © 2008-2022 免费范文网 版权所有
声明 :本网站尊重并保护知识产权,根据《信息网络传播权保护条例》,如果我们转载的作品侵犯了您的权利,请在一个月内通知我们,我们会及时删除。
客服QQ: 邮箱:tiandhx2@hotmail.com
苏ICP备16052595号-18
× 注册会员免费下载(下载后可以自由复制和排版)
注册会员下载
全站内容免费自由复制
注册会员下载
全站内容免费自由复制
注:下载文档有可能“只有目录或者内容不全”等情况,请下载之前注意辨别,如果您已付费且无法下载或内容有问题,请联系我们协助你处理。
微信: QQ: