All for whom want to be Richer.
沒有經過學習就直接去交易,就像是沒經過外科訓練就直接去開刀。
如果不知道怎麼交易獲利,應該先學習和思考成功交易者的作法。
站內的程式碼僅供Tradestation與Multicharts學習使用,不代表獲利保證,直接用於交易者請自己承擔盈虧責任。
(程式碼) Pivots ID
[LegacyColorValue = TRUE];
{ *****************************************************************************************
Study : Pivots ID
*******************************************************************************************}
Inputs: TrailBar(4);
Vars: Pivot(0), Support1(0), Support2(0), Support3(0),
Resistance1(0), Resistance2(0), Resistance3(0),
NoLongTradeToday(False), NoShortTradeToday(False);
{ Calculate Pivots at the begining of the day }
If ( Date <> Date[1] ) then Begin
Pivot = ( Low + High + Close ) / 3;
Resistance1 = ( Pivot * 2 ) - Low;
Resistance2 = Pivot + Range;
Resistance3 = Resistance1 + Range;
Support1 = ( Pivot * 2 ) - High;
Support2 = Pivot - Range;
Support3 = Support1 - Range;
End;
If ( Date next bar = Date ) or ( ( time > Sess1StartTime ) and ( time < Sess1EndTime ) ) then Begin
{ Placement of Short orders }
If Low > Support3 then Begin
SellShort next bar at Support3 stop;
SellShort next bar at Support2 stop;
End;
{ Placement of long orders }
If High < Resistance3 then begin
Buy next bar at Resistance2 stop;
Buy next bar at Resistance3 stop;
End;
End;
{ Trailing Stop }
Sell next bar at Lowest( Low , TrailBar ) Stop;
BuytoCover next bar at Highest( High , Trailbar ) Stop;