人人爽天天爽夜夜爽qc-人人爽天天爽夜夜爽曰-人人天天爱天天做天天摸-人人天天夜夜-色网站在线-色网站在线看
打印本文
關(guān)閉窗口
[求助]麻煩老師了
作者:文華財(cái)經(jīng) 來(lái)源:cxh99.com 發(fā)布時(shí)間:2018年05月02日
咨詢(xún)內(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; //中間線(xiàn) ?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;}
//再次入場(chǎng)的代碼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
?
?來(lái)源:程序化99
文華技術(shù)人員:
?我們提供程序化軟件MQ,類(lèi)似C語(yǔ)言的語(yǔ)法結(jié)構(gòu),兼容了您上面模型的語(yǔ)法,簡(jiǎn)單修改后即可使用
您下載MQ試下,如果您不會(huì)改,我們?cè)賻湍治鱿?br style="line-height: 22px;" />MQ地址?https://mq.wenhua.com.cn/
?
?
?來(lái)源: www.kzuj.com.cn
文華客服:
?老師,復(fù)制到MQ還是不行,提示
文件名:sgz1g(od(zuhecco5}s4icc.png
?麻煩老師改為MQ可以用的
?
網(wǎng)友回復(fù):
參考:
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;
//中間線(xiàn)
?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;
}
//再次入場(chǎng)的代碼
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
打印本文
關(guān)閉窗口
主站蜘蛛池模板:
日本大片免费一级
|
一级女性全黄生活片免费看
|
国产欧美日韩在线
|
500第一导航亚洲精品导航
|
精品400部自拍视频在线播放
|
我要看黄色一级片
|
日韩欧美亚洲香蕉七次郎
|
国产综合亚洲专区在线
|
冲田杏梨午夜久久99视
|
bt7086福利一区国产
|
精品一区一区三区新区乱码
|
欧美性video精品
|
日本aⅴ精品一区二区三区久久
|
亚洲欧美精品一区天堂久久
|
亚洲视频一区二区三区
|
日本视频网站在线www色
|
99视频热
|
日色网站
|
亚洲综合图片网
|
在线观看理论片免费韩国
|
国产精品欧美一区二区
|
国产成人综合亚洲动漫在线
|
在线观看免费毛片
|
黄色大片免费播放
|
成 人 黄 色 视频免费播放
|
国产在线91精品天天更新
|
a丫久久久久久一级毛片
|
成人在线视频一区
|
91亚洲精品第一综合不卡播放
|
69堂午夜精品视频在线
|
亚洲视频在线a视频
|
国产亚洲午夜精品a一区二区
|
国产在线精品二区李沁
|
中文字幕在线观看日韩
|
一区二区三区精品视频
|
国产a级特黄的片子视频
|
青青青草国产
|
夜夜躁日日躁狠狠久久
|
无遮挡动漫黄漫网站在线观看
|
午夜综合网
|
日本99热
|