人人爽天天爽夜夜爽qc-人人爽天天爽夜夜爽曰-人人天天爱天天做天天摸-人人天天夜夜-色网站在线-色网站在线看

您現在的位置:程序化交易>> 期貨公式>> 文華財經>> 文華財經知識>>正文內容

[求助]麻煩老師了 [文華財經]

  • 咨詢內容: ?麻煩老師改成文化可用的
    Params? ? ? Numeric Length(40);? ? ? Numeric NumATRs(1); ?Numeric Offset(1); ?Numeric ATRLength(10); ?Numeric TrailingStart(1); ?Numeric StopLossSet(4); ?Numeric TrailingStop(3);Vars? ? ? NumericSeries TPrice;? ? ? Numeric AvgValue;? ? ? NumericSeries ShiftValue;? ? ? Numeric UpperBand;? ? ? Numeric LowerBand;? ? ? Numeric MyPrice; ?Numeric UpLine; //上軌 ?Numeric DownLine; //下軌? ?NumericSeries MidLine; //中間線 ?Numeric Band; ?NumericSeries HigherAfterEntry; ?NumericSeries LowerAfterEntry; ?Numeric DayOpen; ?Numeric StopLine; ?BoolSeries bLongTrailingStoped;? ? ? BoolSeries bShortTrailingStoped; ?Numeric MinPoint;Begin? ? ?MinPoint = MinMove*PriceScale;? ? ?DayOpen=AvgEntryPrice; TPrice=(High[1]+Low[1]+Close[1])/3;? ? ?AvgValue=AverageFC(TPrice,Length);? ? ?ShiftValue=NumATRs*AvgTrueRange(ATRLength);? ? ?UpperBand=AvgValue+ShiftValue[1];? ? ?LowerBand=AvgValue-ShiftValue[1]; MidLine = AverageFC(Close,Length); Band = StandardDev(Close,Length,2);? UpLine = MidLine + Offset * Band; DownLine = MidLine - Offset * Band;? ?If(BarStatus > 0){ bLongTrailingStoped = bLongTrailingStoped[1]; bShortTrailingStoped = bShortTrailingStoped[1];}Commentary("bLTrue","False"));Commentary("bShortTrailingStoped="+IIFString(bShortTrailingStoped,"True","False"));
    If(BarsSinceEntry==1){? ? HigherAfterEntry=AvgEntryPrice;? ? LowerAfterEntry=HigherAfterEntry;}Else// If(BarsSinceEntry>1){? ? ? ?HigherAfterEntry=max(HigherafterEntry[1],High[1]);? ? ? ?LowerAfterEntry=min(LowerAfterEntry[1],Low[1]);}If(bLongTrailingStoped==False && MarketPosition!=1&&High>=UpperBand)? ?{? ? ? MyPrice=UpperBand;? ? ? If(Open>MyPrice)MyPrice=Open;? ? ? Buy(1,MyPrice); ?bLongTrailingStoped=True; ?bShortTrailingStoped=False;? ? ? Return;? ?}If(bShortTrailingStoped==False && MarketPosition!=-1&&Low<=LowerBand){? ? ?MyPrice=LowerBand;? ? ?If(Open<MyPrice)MyPrice=Open;? ? ?SellShort(1,MyPrice);? bShortTrailingStoped=True; bLongTrailingStoped=False;? ? ?Return;}If(HigherAfterEntry>=AvgEntryPrice+DayOpen*TrailingStart*0.01&&MarketPosition==1){? ? ? ?StopLine=HigherAfterEntry-DayOpen*TrailingStop*0.01;}Else//止損{? ? ? ?StopLine=UpperBand-DayOpen*StopLossSet*0.01;}If(Low<=StopLine){? ? ? ?MyPrice=StopLine;? ? ? ?If(Open<MyPrice)MyPrice=Open;? ? ? ?Sell(1,MyPrice); ? bLongTrailingStoped=True; ? bShortTrailingStoped=False;? ? ? ?Return;}If(LowerAfterEntry<=AvgEntryPrice-DayOpen*TrailingStart*0.01&&MarketPosition==-1){? ? ? ?StopLine=LowerAfterEntry+DayOpen*TrailingStop*0.01;}Else//止損{? ? ? ?StopLine=LowerBand+DayOpen*StopLossSet*0.01;}
    If(High>=StopLine){? ? ? ?MyPrice=StopLine;? ? ? ?If(Open>MyPrice)MyPrice=Open;? ? ? ?Buytocover(1,MyPrice); bShortTrailingStoped=True; bLongTrailingStoped=False;? ? ? ?Return;}

    //再次入場的代碼If(bLongTrailingStoped && MarketPosition==0 && High > HigherAfterEntry){ MyPrice = HigherAfterEntry + MinPoint; If(Open > MyPrice) MyPrice = Open; Buy(1,MyPrice); bLongTrailingStoped = False; bShortTrailingStoped= True; Return;}If(bShortTrailingStoped && MarketPosition==0 && Low < LowerAfterEntry){ MyPrice = LowerAfterEntry - MinPoint; If(Open < MyPrice) MyPrice = Open; SellShort(1,MyPrice); bLongTrailingStoped = True; bShortTrailingStoped= False; Return;}End

    ?

    ?來源:程序化99

  • 文華技術人員: ?我們提供程序化軟件MQ,類似C語言的語法結構,兼容了您上面模型的語法,簡單修改后即可使用
    您下載MQ試下,如果您不會改,我們再幫您分析下
    MQ地址?https://mq.wenhua.com.cn/
    ?

    ?

    ?來源: m.kzuj.com.cn

  • 文華客服: ?老師,復制到MQ還是不行,提示


    文件名:sgz1g(od(zuhecco5}s4icc.png
    ?麻煩老師改為MQ可以用的

    ?

  • 網友回復: 參考:
    Params ? ? ? Numeric Length(40); ? ? ? Numeric NumATRs(1);
    ?Numeric Offset(1);
    ?Numeric ATRLength(10);
    ?Numeric TrailingStart(1);
    ?Numeric StopLossSet(4);
    ?Numeric TrailingStop(3); Vars ? ? ? NumericSeries TPrice; ? ? ? Numeric AvgValue; ? ? ? NumericSeries ShiftValue; ? ? ? Numeric UpperBand; ? ? ? Numeric LowerBand; ? ? ? Numeric MyPrice;
    ?Numeric UpLine; //上軌
    ?Numeric DownLine; //下軌?
    ?NumericSeries MidLine; //中間線
    ?Numeric Band;
    ?NumericSeries HigherAfterEntry;
    ?NumericSeries LowerAfterEntry;
    ?Numeric DayOpen;
    ?Numeric StopLine;
    ?NumericSeries bLongTrailingStoped; ? ? ? ?NumericSeries bShortTrailingStoped;
    ?Numeric MinPoint; Begin ? ? ?MinPoint = MinMove*PriceScale; ? ? ?DayOpen=AvgEntryPrice;
    TPrice=(High[1]+Low[1]+Close[1])/3; ? ? ?AvgValue=AverageFC(TPrice,Length); ? ? ?ShiftValue=NumATRs*AvgTrueRange(ATRLength); ? ? ?UpperBand=AvgValue+ShiftValue[1]; ? ? ?LowerBand=AvgValue-ShiftValue[1];
    MidLine = AverageFC(Close,Length);
    Band = StandardDev(Close,Length,2);?
    UpLine = MidLine + Offset * Band;
    DownLine = MidLine - Offset * Band;?
    ? If(BarStatus > 0) {
    bLongTrailingStoped = bLongTrailingStoped[1];
    bShortTrailingStoped = bShortTrailingStoped[1]; } //Commentary("bLTrue,"False")); Commentary("bShortTrailingStoped="+IIFString(bShortTrailingStoped,"True","False"));

    If(BarsSinceEntry==1) { ? ? HigherAfterEntry=AvgEntryPrice; ? ? LowerAfterEntry=HigherAfterEntry; }Else// If(BarsSinceEntry>1) { ? ? ? ?HigherAfterEntry=max(HigherafterEntry[1],High[1]); ? ? ? ?LowerAfterEntry=min(LowerAfterEntry[1],Low[1]); } If(bLongTrailingStoped==0&& MarketPosition!=1&&High>=UpperBand) ? ?{ ? ? ? MyPrice=UpperBand; ? ? ? If(Open>MyPrice)MyPrice=Open; ? ? ? Buy(1,MyPrice);
    ?bLongTrailingStoped=1;
    ?bShortTrailingStoped=0; ? ? ? Return; ? ?} If(bShortTrailingStoped==0 && MarketPosition!=-1&&Low<=LowerBand) { ? ? ?MyPrice=LowerBand; ? ? ?If(Open<MyPrice)MyPrice=Open; ? ? ?SellShort(1,MyPrice);?
    bShortTrailingStoped=1;
    bLongTrailingStoped=0; ? ? ?Return; } If(HigherAfterEntry>=AvgEntryPrice+DayOpen*TrailingStart*0.01&&MarketPosition==1) { ? ? ? ?StopLine=HigherAfterEntry-DayOpen*TrailingStop*0.01; }Else//止損 { ? ? ? ?StopLine=UpperBand-DayOpen*StopLossSet*0.01; } If(Low<=StopLine) { ? ? ? ?MyPrice=StopLine; ? ? ? ?If(Open<MyPrice)MyPrice=Open; ? ? ? ?Sell(1,MyPrice);
    ? bLongTrailingStoped=1;
    ? bShortTrailingStoped=0; ? ? ? ?Return; } If(LowerAfterEntry<=AvgEntryPrice-DayOpen*TrailingStart*0.01&&MarketPosition==-1) { ? ? ? ?StopLine=LowerAfterEntry+DayOpen*TrailingStop*0.01; }Else//止損 { ? ? ? ?StopLine=LowerBand+DayOpen*StopLossSet*0.01; }
    If(High>=StopLine) { ? ? ? ?MyPrice=StopLine; ? ? ? ?If(Open>MyPrice)MyPrice=Open; ? ? ? ?Buytocover(1,MyPrice);
    bShortTrailingStoped=1;
    bLongTrailingStoped=0; ? ? ? ?Return; }

    //再次入場的代碼 If(bLongTrailingStoped && MarketPosition==0 && High > HigherAfterEntry) {
    MyPrice = HigherAfterEntry + MinPoint;
    If(Open > MyPrice) MyPrice = Open;
    Buy(1,MyPrice);
    bLongTrailingStoped = 0;
    bShortTrailingStoped=1;
    Return; } If(bShortTrailingStoped && MarketPosition==0 && Low < LowerAfterEntry) {
    MyPrice = LowerAfterEntry - MinPoint;
    If(Open < MyPrice) MyPrice = Open;
    SellShort(1,MyPrice);
    bLongTrailingStoped = 1;
    bShortTrailingStoped= 0;
    Return; } End

 

有思路,想編寫各種指標公式,程序化交易模型,選股公式,預警公式的朋友

可聯系技術人員 QQ: 511411198  點擊這里給我發消息進行 有償 編寫!不貴!點擊查看價格!


【字體: 】【打印文章】【查看評論

相關文章

    沒有相關內容
主站蜘蛛池模板: 一区二区三区视频在线播放 | 日韩久久久精品首页 | 97天天摸天天碰天天爽 | 最近中文字幕2019免费6 | 欧美激情亚洲精品日韩1区2区 | 国产精品国产三级国产无毒 | 波多野结衣久久一区二区 | 日本高清中文字幕在线观穿线视频 | 国产成年人在线观看 | 中文字幕无线码欧美成人 | 夜夜影视| 成人一级黄色毛片 | 91精品成人免费国产 | 中文字幕s级优女区 | 五月婷在线视频 | 国产欧美成人一区二区三区 | 欧日韩视频 | 日韩国产欧美 | 69人成网站色www | 精品伊人久久久99热这里只 | 91欧美在线视频 | 91精品国产美女福到在线不卡 | 禁止十八成人无限免费观看网站 | 亚洲第一免费播放区 | 中国一级特黄高清免费的大片 | 日本无遮挡亲吻膜下面免费 | 免费欧美一级 | 天天影视色香欲综合网网站麻豆 | 欧美ay亚洲ay日韩ay | 精品伊人久久久99热这里只 | 亚洲另类自拍丝袜第1页 | 日本一本高清视频 | 看全色黄大色黄大片免责看的 | 国产三级图片 | 三级视频网 | 亚洲色图图片 | 97欧美在线看欧美视频免费 | 黄色在线观看国产 | 深夜福利欧美 | 午夜精品久久久久久影视riav | 日本jizz强视频69视频 |