您現(xiàn)在的位置:程序化交易>> 期貨公式>> 文華財經(jīng)>> 文華財經(jīng)知識>>正文內(nèi)容

[求助]麻煩老師了 [文華財經(jīng)]

  • 咨詢內(nèi)容: ?麻煩老師改成文化可用的
    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

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

    ?

    ?來源: www.tumamayizhan.com

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


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

    ?

  • 網(wǎng)友回復: 參考:
    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

 

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

可聯(lián)系技術(shù)人員 QQ: 511411198  點擊這里給我發(fā)消息進行 有償 編寫!不貴!點擊查看價格!


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

相關(guān)文章

    沒有相關(guān)內(nèi)容
主站蜘蛛池模板: 亚洲日韩乱码中文无码蜜桃臀| 色久综合网精品一区二区 | 老师你的兔子好软水好多的车视频| 激情综合网婷婷| 无翼乌全彩里番蛇姬本子| 国产精品水嫩水嫩| 免费观看成人毛片| 久久久噜噜噜www成人网 | 在线观看国产福利| 国产女人的高潮大叫毛片| 亚洲综合综合在线| 中文字幕人妻中文AV不卡专区| 中文字幕免费在线看线人| 美女扒开胸罩让男生吃乳 | 狠狠操精品视频| 日本久久久久中文字幕| 国模杨依粉嫩蝴蝶150P| 和前辈夫妇交换性3中文字幕| 亚洲人成亚洲人成在线观看| 一个人看的www日本高清视频| 999影院成人在线影院| 波多野结衣在线观看一区| 成年女人免费播放影院| 国产成人精品高清在线观看99 | 免费看h片网站| 久久久久99精品国产片| 五月婷中文字幕| 波多野结衣搜查官| 性欧美大战久久久久久久| 国产在线高清精品二区| 亚洲欧美另类久久久精品能播放的 | 国产乱码一区二区三区| 亚洲午夜在线一区| 99精品热这里只有精品| 绝美女神抬臀娇吟| 日本福利一区二区| 国产日韩成人内射视频| 亚洲欧美久久一区二区| a级国产乱理伦片在线观| 精品一区二区三区视频在线观看| 日本一区二区三区在线视频观看免费|