|
QooQ 發表於 13-1-21 21:53
不知沒有會的人可以教一下... 感激不盡!!
* 小弟來幫一下大大好了
barcomplete = BarIndex() < LastValue(BarIndex());
_SECTION_BEGIN("Background_Setting");
SetChartBkColor(1);
SetChartOptions(2,chartShowArrows|chartShowDates|chartWrapTitle);
SetChartBkGradientFill(1, 1, 1);
GraphXSpace = Param("Zoom/In Out",100,-50,150,1);
dist = 2*ATR(15);
_SECTION_END();
SetPositionSize(1, spsShares);
SetOption("InitialEquity", 1000000);
SetOption("FuturesMode", 1);
SetOption("CommissionMode", 3);
SetOption("CommissionAmount", 1000);
RoundLotSize = 1;
PointValue = 200;
Buy = Cross( (H+L+C)/3, MA(C,10) ) AND barcomplete;
Short = Cross( MA(C,5), (H+L+C)/3 ) AND barcomplete;
Buy = Cover = ExRem(Buy, Short);
Short = Sell = ExRem(Short, Buy);
BuyPrice = CoverPrice = C;
ShortPrice = SellPrice = C;
Position = IIf(Buy, 1, IIf(Short, -1, 0));
CurrentPosition = ValueWhen(Position!=0, Position, 1);
IsCPNull = IsNull(CurrentPosition);
MarketPosition = IIf(Cum(Buy+Short)==0, 0, IIf(IsCPNull!=1, IIf(CurrentPosition==1, 1, -1), 0));
_SECTION_BEGIN("Charts");
PlotOHLC( O, H, L, C, "", IIf(MarketPosition == 0, 0, IIf(MarketPosition>0, colorRed, colorGreen)), styleBar|styleNoLabel);
PlotShapes(IIf(Buy, 59, shapeNone), 7, 0, WMA(O,10)-dist, 6);
PlotShapes(IIf(Short, 60, shapeNone), 7, 0, WMA(O,10)+dist, 0);
_SECTION_END();
---
HTS 裡的 print
在 AB 裡是 printf
參考看看吧
|
|