PureBytes Links
Trading Reference Links
|
{*******************************************************************
Description : Pivot_Long-Short (signal/system)
Provided By : Clyde Lee/FuturesMagic (c) Copyright 2000
This signal/system uses computations provided by Omega Research
in the below referenced entry signals.
The system allows several methods/modes of computation of the
pivot point and the support and resistance points for a given
day.
To make the system effective I have added the following:
Mode -- Selection of type of computation for pivot and for
Support and Resistance zones 1 and 2 -- see below.
PvtType -- Defines Type of pivot to use: 1=hlc/3, 2=ohlc/4,
or 3=close - all of prior day.
LastTraT -- latest time at which a trade signal can be issued.
You will be surprised at how this effects the
performance of this system. For optimization this
and the following parameter may be expressed in
decimal hour form such that xx.yy xx=hour and
yy is decimal portion of hour (e.g. 15.25 = 1515).
ExitTrad -- Time at which to exit all positions near or at end
of trading sessions. Again check best time for this
parameter.
DolStop -- a fixed dollar amount above/below the entry price to
set a MoneyManagement stoploss point. If this value
is less than 50 then the value is a multiplier of the
previous day range to compute stoploss offset.
R_S1Mult -- when using computational modes 2 and 5, this parameter
provides a multiplier of the prior day trading range
to calculate a value to establish the Resistance and
Support Levels ONE (R1/S1).
R_S2Mult -- when using computational modes 2 and 5, this parameter
provides a multiplier of the prior day trading range
to calculate a value to establish the Resistance and
Support Levels TWO (R1/S1).
COMPUTATIONAL MODE 1 is the "conventional" method of computing
support and resistance points as pointed out for many years.
COMPUTATIONAL MODE 2 is the "conventional" method of computing
support and resistance points as contained in BobR's elas.
COMPUTATIONAL MODE 3 uses the same pivot as computed for mode 1
but uses indicated multipliers to establish R1/R2 and S1/S2 levels.
COMPUTATIONAL MODE 4 uses some Fib multipliers for the prior day
range (as in mode 2) to establish the R1/R2 and S1/S2 levels.
COMPUTATIONAL MODE 5 uses some Fib multipliers used as the default
values in BobR's ela. These are different than ones in mode 4.
I ran this system of 5 minute bars for the December 99 contract
of the SP and was surprised at the results.
The default values is what worked best for that commodity and for
the selected time period (9/10/99-12/10/99)
********************************************************************}
{*******************************************************************
Description : Pivot Point Long Entry
Description : Pivot Point Short Entry
Provided By : Omega Research, Inc. (c) Copyright 1999
********************************************************************}
Inputs: Mode(3), {Set to negative value to use ohlc pivot}
PvtType(1), {Type of pivot 1=hlc, 2=ohlc, 3=c }
LastTraT(1115), {Last time to issue a trade order--may be
fractional hh.hh}
ExitTrad(1545), {Time to close trade for day --may be
fractional hh.hh}
DolStop(700),
R_S1Mult(.55),
R_S2Mult(0.9);
Variables: PvtPoint(0), CanTrade(false),DayRange(H-L),
Resistance1(0), Resistance2(0), Resistance3(0),
Support1(0), Support2(0), Support3(0),
MP(0),DayKnt(0),
LastTradeTime(iff(LastTraT>24,LastTraT,IntPortion(LastTraT)*100+FracPort
ion(LastTraT)*60)),
ExitTradeTime(iff(ExitTrad>24,ExitTrad,IntPortion(ExitTrad)*100+FracPort
ion(ExitTrad)*60)),
StopPts(DolStop/BigPointValue) ;
MP=MarketPosition;
If Date <> Date[1] then Begin
If MP<>0 then begin
ExitLong;
ExitShort;
End;
DayKnt=DayKnt+1;
DayRange = HighD_2K(1) - LowD_2K(1);
PvtPoint = HighD_2K(1) + LowD_2K(1) + CloseD_2K(1) ;
If PvtType=2 then
PvtPoint = (PvtPoint + OpenD_2K(1)) / 4
Else if PvtType=1 then
PvtPoint = PvtPoint / 3
Else
PvtPoint = CloseD_2K(1);
If DolStop<50 then StopPts=DayRange*DolStop;
If Mode=1 then begin {Omega Research}
Resistance1 = PvtPoint * 2 - LowD_2K(1);
Resistance2 = PvtPoint + DayRange;
Resistance3 = Resistance1 + DayRange;
Support1 = PvtPoint * 2 - HighD_2K(1);
Support2 = PvtPoint - DayRange;
Support3 = Support1 - DayRange;
End
Else If Mode=2 then begin {BobR Pivots}
Resistance1 = 2 * PvtPoint - LowD_2K(1); {R1}
Support1 = 2 * PvtPoint - HighD_2K(1); {S1}
Support2 = PvtPoint + Support1 - Resistance1; {S2}
Support3 = 2 * Support1 - Resistance1; {S3}
Resistance2 = PvtPoint + Resistance1 - Support1; {R2}
Resistance3 = PvtPoint - Support1 + Resistance2; {R3}
End
Else If Mode=3 then begin {C Lee multipliers scheme}
Resistance1 = PvtPoint + R_S1Mult*DayRange;
Resistance2 = PvtPoint + R_S2Mult*DayRange;
Resistance3 = Resistance1 + DayRange;
Support1 = PvtPoint - R_S1Mult*DayRange;
Support2 = PvtPoint - R_S2Mult*DayRange;
Support3 = Support1 - DayRange;
End
Else If Mode=4 then begin {C Lee fib defaults}
Resistance1 = PvtPoint + 0.618 * DayRange;
Resistance2 = PvtPoint + 1.000 * DayRange;
Resistance3 = PvtPoint + 1.618 * DayRange;
Support1 = PvtPoint - 0.618 * DayRange;
Support2 = PvtPoint - 1.000 * DayRange;
Support3 = PvtPoint - 1.618 * DayRange;
End
Else If Mode=5 then begin {BobR Fib Defaults}
Support3 = PvtPoint - 1.000 * DayRange;
Support2 = PvtPoint - 0.618 * DayRange;
Support1 = PvtPoint - 0.500 * DayRange;
Resistance3 = PvtPoint + 1.000 * DayRange;
Resistance2 = PvtPoint + 0.618 * DayRange;
Resistance1 = PvtPoint + 0.500 * DayRange;
End;
CanTrade = Open<Resistance1 and Open>Support1 and
DayKnt>2;
end;
If Time>=LastTradeTime or MP<>0 then CanTrade=false;
If CanTrade and MP=0 then begin
If AbsValue(c-Resistance1)<AbsValue(c-Support1) then begin
Sell ("PvS1") Next Bar at Resistance1 Limit;
{Sell ("PvS2") Next Bar at Resistance2 Limit;}
End
Else begin
Buy ("PvB1") Next Bar at Support1 Limit;
{Buy ("PvB2") Next Bar at Support2 Limit;}
End;
End;
if MP>0 then begin
ExitLong ("XLs") at EntryPrice-StopPts stop;
ExitLong at Support2 stop;
CanTrade=false;
end
else if MP<0 then begin
ExitShort ("XSs") at EntryPrice+StopPts stop;
ExitShort at Resistance2 stop;
CanTrade=false;
End;
If time>=ExitTradeTime then begin
ExitLong ("XLed") this bar on close ;
ExitShort ("XSed") this bar on close ;
End;
= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
{*******************************************************************
Description : Pivot_Long-Short (indicator)
Provided By : Clyde Lee/FuturesMagic (c) Copyright 2000
This signal/system uses computations provided by Omega Research
in the below referenced entry signals.
The system allows several methods/modes of computation of the
pivot point and the support and resistance points for a given
day.
To make the system effective I have added the following:
Mode -- Selection of type of computation for pivot and for
Support and Resistance zones 1 and 2 -- see below.
PvtType -- Defines Type of pivot to use: 1=hlc/3, 2=ohlc/4,
or 3=close - all of prior day.
LastTraT -- latest time at which a trade signal can be issued.
You will be surprised at how this effects the
performance of this system. For optimization this
and the following parameter may be expressed in
decimal hour form such that xx.yy xx=hour and
yy is decimal portion of hour (e.g. 15.25 = 1515).
ExitTrad -- Time at which to exit all positions near or at end
of trading sessions. Again check best time for this
parameter.
DolStop -- a fixed dollar amount above/below the entry price to
set a MoneyManagement stoploss point. If this value
is less than 50 then the value is a multiplier of the
previous day range to compute stoploss offset.
R_S1Mult -- when using computational modes 2 and 5, this parameter
provides a multiplier of the prior day trading range
to calculate a value to establish the Resistance and
Support Levels ONE (R1/S1).
R_S2Mult -- when using computational modes 2 and 5, this parameter
provides a multiplier of the prior day trading range
to calculate a value to establish the Resistance and
Support Levels TWO (R1/S1).
COMPUTATIONAL MODE 1 is the "conventional" method of computing
support and resistance points as pointed out for many years.
COMPUTATIONAL MODE 2 is the "conventional" method of computing
support and resistance points as contained in BobR's elas.
COMPUTATIONAL MODE 3 uses the same pivot as computed for mode 1
but uses indicated multipliers to establish R1/R2 and S1/S2 levels.
COMPUTATIONAL MODE 4 uses some Fib multipliers for the prior day
range (as in mode 2) to establish the R1/R2 and S1/S2 levels.
COMPUTATIONAL MODE 5 uses some Fib multipliers used as the default
values in BobR's ela. These are different than ones in mode 4.
I ran this system of 5 minute bars for the December 99 contract
of the SP and was surprised at the results.
The default values is what worked best for that commodity and for
the selected time period (9/10/99-12/10/99)
********************************************************************}
{*******************************************************************
Description : Pivot Point Long Entry
Description : Pivot Point Short Entry
Provided By : Omega Research, Inc. (c) Copyright 1999
********************************************************************}
Inputs: Mode(3), {Set to negative value to use ohlc pivot}
PvtType(1), {Type of pivot 1=hlc, 2=ohlc, 3=c }
LastTraT(1115), {Last time to issue a trade order--may be
fractional hh.hh}
ExitTrad(1545), {Time to close trade for day --may be
fractional hh.hh}
DolStop(700),
R_S1Mult(.55),
R_S2Mult(0.9);
Variables: PivPnt(0), CanTrade(false),DayRng(H-L),
Resistance1(0), Resistance2(0), Resistance3(0),
Support1(0), Support2(0), Support3(0),
MP(0),DayKnt(0),
LastTradeTime(iff(LastTraT>24,LastTraT,IntPortion(LastTraT)*100+FracPort
ion(LastTraT)*60)),
ExitTradeTime(iff(ExitTrad>24,ExitTrad,IntPortion(ExitTrad)*100+FracPort
ion(ExitTrad)*60)),
StopPts(DolStop/BigPointValue) ;
MP=I_MarketPosition;
If Date <> Date[1] then Begin
DayKnt=DayKnt+1;
DayRng = HighD_2K(1) - LowD_2K(1);
PivPnt = HighD_2K(1) + LowD_2K(1) + CloseD_2K(1) ;
If PvtType=2 then
PivPnt = (PivPnt + OpenD_2K(1)) / 4
Else if PvtType=1 then
PivPnt = PivPnt / 3
Else
PivPnt = CloseD_2K(1);
If DolStop<50 then StopPts=DayRng*DolStop;
If Mode=1 then begin {Omega Research}
Resistance1 = (PivPnt * 2) - LowD_2K(1);
Resistance2 = PivPnt + DayRng;
Resistance3 = Resistance1 + DayRng;
Support1 = (PivPnt * 2) - HighD_2K(1);
Support2 = PivPnt - DayRng;
Support3 = Support1 - DayRng;
End
Else If Mode=2 then begin {BobR Pivots}
Resistance1 = 2*PivPnt - LowD_2K(1); {R1}
Support1 = 2*PivPnt - HighD_2K(1); {S1}
Support2 = PivPnt + Support1 - Resistance1; {S2}
Support3 = 2 * Support1 - Resistance1; {S3}
Resistance2 = PivPnt + Resistance1 - Support1; {R2}
Resistance3 = PivPnt - Support1 + Resistance2; {R3}
End
Else If Mode=3 then begin {C Lee multipliers scheme}
Resistance1 = PivPnt + R_S1Mult * DayRng;
Resistance2 = PivPnt + R_S2Mult * DayRng;
Resistance3 = Resistance1 + DayRng;
Support1 = PivPnt - R_S1Mult * DayRng;
Support2 = PivPnt - R_S2Mult * DayRng;
Support3 = Support1 - DayRng;
End
Else If Mode=4 then begin {C Lee fib defaults}
Resistance1 = PivPnt + 0.62 * DayRng;
Resistance2 = PivPnt + 1.00 * DayRng;
Resistance3 = PivPnt + 1.62 * DayRng;
Support1 = PivPnt - 0.62 * DayRng;
Support2 = PivPnt - 1.00 * DayRng;
Support3 = PivPnt - 1.62 * DayRng;
End
Else If Mode=5 then begin {BobR Fib Defaults}
Support3 =PivPnt - 1.000 * DayRng;
Support2 =PivPnt - 0.618 * DayRng;
Support1 =PivPnt - 0.500 * DayRng;
Resistance3=PivPnt + 1.000 * DayRng;
Resistance2=PivPnt + 0.618 * DayRng;
Resistance1=PivPnt + 0.500 * DayRng;
End;
CanTrade = {Open<Resistance1 and Open>Support1 and }
DayKnt>2;
end;
If Time>=LastTradeTime then CanTrade=false;
If CanTrade then begin
Plot1(Resistance2,"PvS2");
Plot2(Resistance1,"PvS1");
Plot3(Support1, "PvB1");
Plot4(Support2, "PvB2");
End;
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Clyde Lee Chairman/CEO (Home of SwingMachine)
SYTECH Corporation email: <clydelee@xxxxxxx>
7910 Westglen, Suite 105 Work: (713) 783-9540
Houston, TX 77063 Fax: (713) 783-1092
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
To subscribe / unsubscribe from SwingMachine list
http://www.egroups.com/list/swingmachine/
After joining list the freeware SwingMachine program
(DOS Version) is available in the VAULT at:
http://www.egroups.com/list/swingmachine/
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|