{ Indicator: FalseBreakout This indicator calculates the size of the false breakout on each bar (if any). It normalizes the result by the average true range and plots the raw value plus the average. Michael R. Bryant Breakout Futures www.BreakoutFutures.com Copyright 2003 Breakout Futures Feb 11, 2003 } Input: N (10); Var: FBO (0), AFBO (0); If C >= C[1] then FBO = MaxList(H - C, C[1] - L) else FBO = MaxList(H - C[1], C - L); FBO = FBO/Average(TrueRange, N); AFBO = Average(FBO, N); Plot1(FBO, "False B/O"); Plot2(AFBO, "Ave B/O"); { Indicator: Trendiness This indicator calculates the change in price divided by the average range over the last NBars bars. This is a measure of choppiness/trendiness. The higher the value, the stronger the trend; the lower, the choppier. Michael R. Bryant Breakout Futures www.BreakoutFutures.com Copyright 2003 Breakout Futures Feb 9, 2003 } Input: NBars (30); Value1 = AbsValue(C - C[NBars])/Average(TrueRange, NBars); Plot1(Value1, "Trendiness"); { TR Test5 Mike Bryant Breakout Futures Copyright 2003 } Input: EntFrL (1.0), { Volatility multiplier for entry } EntFrS (1.0), { Volatility multiplier for entry } MMFrL (2.0), { Volatility multiplier for exit } MMFrS (2.0); { Volatility multiplier for exit } Var: ATR (0); { average true range } ATR = Average(TrueRange, 22); Buy next bar at H + EntFrL * ATR stop; Sell short next bar at L - EntFrS * ATR stop; If MarketPosition = 1 and C > EntryPrice and BarsSinceEntry >= 1 then Sell this bar at close; If MarketPosition = -1 and C < EntryPrice and BarsSinceEntry >= 1 then Buy to cover this bar at close; If MarketPosition = 1 then Sell next bar at EntryPrice - MMFrL * ATR stop; If MarketPosition = -1 then Buy to Cover next bar at EntryPrice + MMFrS * ATR stop; { TR Test9 Mike Bryant Breakout Futures Copyright 2003 } Input: FrLv0 (.8), { Breakout fraction, low vol, longs } FrLv1 (.3), { Breakout fraction, high vol, longs } FrSv0 (.8), { Breakout fraction, low vol, shorts } FrSv1 (.3), { Breakout fraction, high vol, shorts } MMFrL (2.0), { Volatility multiplier for exit, longs } MMFrS (2.0); { Volatility multiplier for exit, shorts } Var: ATR (0), { average true range } ML (0), { slope of b/o fraction curve, longs } BL (0), { y-intercept, longs } MS (0), { slope of b/o fraction curve, shorts } BS (0), { y-intercept, longs } V0 (16), { low volatility } V1 (30), { high volatility } FrL (0), { entry fraction for longs } FrS (0); { entry fraction for shorts } ATR = Average(TrueRange, 22); ML = (FrLv1 - FrLv0)/(V1 - V0); BL = FrLv0 - ML * V0; MS = (FrSv1 - FrSv0)/(V1 - V0); BS = FrSv0 - MS * V0; FrL = ML * ATR + BL; FrS = MS * ATR + BS; Buy next bar at H + FrL * ATR stop; Sell short next bar at L - FrS * ATR stop; If MarketPosition = 1 and C > EntryPrice and BarsSinceEntry >= 1 then Sell this bar at close; If MarketPosition = -1 and C < EntryPrice and BarsSinceEntry >= 1 then Buy to cover this bar at close; If MarketPosition = 1 then Sell next bar at EntryPrice - MMFrL * ATR stop; If MarketPosition = -1 then Buy to Cover next bar at EntryPrice + MMFrS * ATR stop;