All for whom want to be Richer.
沒有經過學習就直接去交易,就像是沒經過外科訓練就直接去開刀。
如果不知道怎麼交易獲利,應該先學習和思考成功交易者的作法。
站內的程式碼僅供Tradestation與Multicharts學習使用,不代表獲利保證,直接用於交易者請自己承擔盈虧責任。
(程式碼) Volatility Expansion
[LegacyColorValue = TRUE];
{ *****************************************************************************************
System : Volatility Expansion
*******************************************************************************************}
Input: LMult(1.2), SMult(1.8), ProfitPt(0), TrailBar(4);
Vars: BuyLevel(0), SellShortLevel(0);
{ Entry Orders }
Buy next bar at Open + Average(Range,4) * LMult Stop;
SellShort next bar at Open - Average(Range,4) * SMult Stop;
{ Exit at first Profitable Open }
If MarketPosition = 1 and Open next bar > EntryPrice + ProfitPt + Commission * CurrentContracts / BigPointValue then
Sell ("Long Profit")next bar at Open;
If MarketPosition = -1 and Open next bar < EntryPrice - ProfitPt - Commission * CurrentContracts / BigPointValue then
BuytoCover ("Short Profit") next bar at Open;
{ Trailing Stops }
If MarketPosition = 1 then
Sell next bar at Lowest( Low , TrailBar ) Stop;
If MarketPosition =-1 then
BuytoCover next bar at Highest( High , TrailBar ) Stop;
{ Stale Position Exit }
If BarsSinceEntry > 4 AND PositionProfit < 500 then Begin
Sell ("Long Too Long") next bar at Market;
BuytoCover ("Short Too Longt") next bar at Market;
End;