Programming
The
“Livermore Market Key”
100
120
100 *(1+2*ThresholdPercent)
120
100
96 *(1+2*ThresholdPercent)
120 *(1-2*ThresholdPercent)
96
115.2
UpTrendThreshold Calculation
=>
DownTrend*(1+2*ThresholdPercent)
Error with Simple Multiplication
method when calculating the Up and
Down Pivot Point.
Process StateNo 1 Routine UpTrend Program Start End StateNo = 1 ? True False Initialization Process StateNo 2 Routine NatlRally StateNo = 2 ? Process StateNo 3 Routine SecRally StateNo = 3 ? Process StateNo 4 Routine SecReact StateNo = 4 ? Process StateNo 5 Routine NatlReact StateNo = 5 ? Process StateNo 6 Routine DnTrend Conditional Reset of NatRallyReset Flag and NatReactReset Flag
True True True True
Jesse Livermore Secret Market Key Flow Chart
by KH TangFalse False False False
First Bar ? False
True
Note: Short form used in the flow chart
PP = PivotPoint
Nat = Natural
Sec = Secondary
Dn
= Down
React = Reaction
Initialization End StateNo=1; InUpTrend=True; InDnTrend=False; UpTrend=C; NatRally=C; SecRally=C; SecReact=C; NatReact=C; DnTrend=C; NatRallyReset=True; NatReactReset=True UpTrendPP=C; NatRallyPP=C; NatReactPP=C; DnTrendPP=C; NatReactReset=True Conditional Reset Parameters InUpTrend AND NatReact < {UpTrend/ (1+2*ThresholdPct)} ? True False InDnTrend AND NatRally > {DnTrend* (1+2*ThresholdPct)} ? NatRallyReset=True False True
State No=1 (InUpTrend) InUpTrend=True InDnTrend=False UpTrend=Price Price > UpTrend ? True Price >= LastPrice ? Process StateNo 1 (InUpTrend) False True False Price < (UpTrend/ (1 +ThresholdPct) ? End StateNo= 5 (InNatReact) NatReactReset=False NatReact= Price UpTrendPP = UpTrend StateNo = 4 (InSecReact) SecReact = Price UpTrendPP = UpTrend True False NatReactReset OR Price<NatReactPP ? State No = 6 (InDnTrend) InDnTrend = True InUpTrend = False DnTrend = Price UpTrendPP = UpTrend (InDnTrend AND Price <DnTrendPP) OR InUpTrend AND Price < {UpTrend/ (1+2*ThresholdPct)} ? False True True True False
Price > NatRally ? StateNo = 2 (InNatRally) NatRally = Price False True Price >= LastPrice ? True False Process StateNo 2 (InNatRally) True (InUpTrend AND Price >UpTrendPP OR InUDnTrend AND Price>DnTrend* (1+2*ThresholdPct)} ? False Price < (NatRally/ (1 +ThresholdPct) ? StateNo= 5 (InNatReact) NatReactReset=False NatReact= Price NatRallyPP = NatRally StateNo = 4 (InSecReact) SecReact = Price NatRallyPP = NatRally True NatReactReset OR Price<NatReactPP ? State No = 6 (InDnTrend) InDnTrend = True InUpTrend = False DnTrend = Price NatRallyPP = NatRally (InDnTrend AND Price <DnTrendPP) OR InUpTrend AND Price < {UpTrend/ (1+2*ThresholdPct)} ? False True True True False False
State No=1 (InUpTrend) InUpTrend=True InDnTrend=False UpTrend=Price
StateNo = 3 (InSecRally) SecRally = Price True False Price >= LastPrice ? Process StateNo 3 (InSecRally) State No = 1 (InUpTrend) InUpTrend = True InDnTrend = False UpTrend = Price StateNo = 2 (InNatRally) NatRally = Price Price > NatRally ? Price > SecRally ? State No = 6 (InDnTrend) InDnTrend = True InUpTrend = False DnTrend = Price Price < NatReactPP ? StateNo = 5 (InNatReact) NatReact = Price StateNo = 4 (InSecReact) SecReact = Price End Price < SecRally/ (1+ThresholdPct) ? False True False True (InDnTrend AND Price <DnTrendPP) OR InUpTrend AND Price < {UpTrend/ (1+2*ThresholdPct)} ? (InUpTrend AND Price >UpTrendPP OR InUDnTrend AND Price>DnTrend* (1+2*ThresholdPct)} ? True False True True False False True False
StateNo = 4 (InSecReact) SecReact = Price StateNo = 5 (InNatReact) NatReact = Price State No = 6 (InDnTrend) InDnTrend = True InUpTrend = False DnTrend = Price State No = 1 (InUpTrend) InUpTrend = True InDnTrend = False UpTrend = Price StateNo = 2 (InNatRally) NatRally = Price StateNo = 3 (InSecRally) SecRally = Price Process StateNo 4 (InSecReact) Price < NatReact ? Price < SecReact ? False False Price >= LastPrice ? False Price > NatRallyPP ? Price > SecReact* (1+ThresholdPct) ? False (InDnTrend AND Price <DnTrendPP) OR InUpTrend AND Price < {UpTrend/ (1+2*ThresholdPct)} ? (InUpTrend AND Price >UpTrendPP OR InUDnTrend AND Price>DnTrend* (1+2*ThresholdPct)} ? True False True True False False True True True True
StateNo= 5 (InNatReact) NatReact = Price State No = 6 (InDnTrend) InDnTrend = False InUpTrend = True DnTrend = Price State No = 1 (InUpTrend) InUpTrend = True InDnTrend = False UpTrend = Price NatReactPP = NatReact StateNo = 2 (InNatRally) NatRallyReset = False NatRally = Price NatReactPP = NatReact StateNo = 3 (InSecRally) SecRally = Price NatReactPP = NatReact Process StateNo 5 (InNatReact) Price < NatReact ? End Price > NatReact* (1+ThresholdPct) ? False True NatRallyReset OR Price>NatRallyPP ? True Price >= LastPrice ? False False False True (InDnTrend AND Price <DnTrendPP) OR InUpTrend AND Price < {UpTrend/ (1+2*ThresholdPct)} ? (InUpTrend AND Price >UpTrendPP OR InUDnTrend AND Price>DnTrend* (1+2*ThresholdPct)} ? True False True True False
State No = 6 (InDnTrend) InDnTrend = True InUpTrend = False DnTrend = Price State No = 1 (InUpTrend) InUpTrend = True InDnTrend = False UpTrend = Price DnTrendPP = DnTrend StateNo = 2 (InNatRally) NatRallyReset = False NatRally = Price DnTrendPP = DnTrend StateNo = 3 (InSecRally) SecRally = Price DnTrendPP = DnTrend Process StateNo 6 (InDnTrend) Price < DownTrend ? True False Price > {DnTrend* (1+ThresholdPct)} ? Price >= LastPrice ? NatRallyReset OR Price>NatRallyPP ? False True True False True False (InUpTrend AND Price >UpTrendPP OR InUDnTrend AND Price>DnTrend* (1+2*ThresholdPct)} ? True False