Page 1 of 1

Average of TTM Scalp

Posted: Thu Nov 20, 2008 9:41 pm
by thehaul
Everything plots the way it should except if you have to reboot chart the values change. Do you think that's a data or charting (MultiChart) issue? I use it as a 50% line, price always wants to come back it to. Make up your own rules and profit.

inputs:
len (4);
variables:
theavg(0),
highBarsAgo(1),
possibleHighBarsAgo(1),
possibleHigh(-2),
hightoBeat(-1),
barsSincePaint(1),
lowBarsAgo(1),
possibleLowBarsAgo(1),
possibleLow(10000001),
lowtoBeat(10000000),
triggerPriceSell(-1),
triggerPriceBuy(1000000),
trend(1),
_UP(1),
_DOWN(-1),
_ON(1),
_OFF(-1),
s_low(1),
s_high(1);

//***************************************************
//****** Find and plot the highest swing high *******
//***************************************************
if trend = _UP then begin

if swingHighBar(1,H,1,barsSincePaint+2) > -1 then begin
possibleHighBarsAgo = swingHighBar(1,H,1,barsSincePaint+2);
possibleHigh = H[possibleHighBarsAgo];
end;

if possibleHigh >= hightoBeat then begin
highBarsAgo = possibleHighBarsAgo;
hightoBeat = possibleHigh;
triggerPriceSell = L[HighBarsAgo - 1];


end;


if C < triggerPriceSell and
highest(high,highBarsAgo) < hightoBeat then begin
//plotpb[highBarsAgo](H[highBarsAgo],L[highBarsAgo],"");
trend = _DOWN;
barsSincePaint = highBarsAgo-1;
hightoBeat = -1;
lowtoBeat = 10000000;
triggerPriceBuy = 10000000;
triggerPriceSell = -1;
highBarsAgo = 1;
possibleHigh = -2;
s_high = L[HighBarsAgo - 1];
theavg = average((( s_low + s_high) /2 ), len);
end;

end;

//***************************************************
//****** Find and plot the lowest swing low *********
//***************************************************

if trend = _DOWN then begin

if swingLowBar(1,L,2,barsSincePaint+2) > -1 then begin
possibleLowBarsAgo = swingLowBar(1,L,2,barsSincePaint+2);
possibleLow = L[possibleLowBarsAgo];
end;

if possibleLow <= lowtoBeat then begin
lowBarsAgo = possibleLowBarsAgo;
lowtoBeat = possibleLow;
triggerPriceBuy = H[LowBarsAgo - 1];
end;


if C > triggerPriceBuy and
lowest(L,lowBarsAgo) > lowtoBeat then begin
//plotpb[lowBarsAgo](H[lowBarsAgo],L[lowBarsAgo],"");
trend = _UP;
barsSincePaint = lowBarsAgo-1;
possibleLow = 10000001;
lowtoBeat = 10000000;
hightoBeat = -1;
triggerPriceBuy = 10000000;
triggerPriceSell = -1;
lowBarsAgo = 1;
s_low = H[LowBarsAgo - 1];
theavg = average((( s_low + s_high) /2 ), len);
end;

end;


Plot3(theavg, "Avg" ) ;

barsSincePaint = barsSincePaint+1;
if trend = _UP then highBarsAgo = highBarsAgo + 1;
if trend = _DOWN then lowBarsAgo = lowBarsAgo + 1;

screenshot

Posted: Sun Nov 23, 2008 11:15 pm
by thehaul
Watch price as it crosses and retraces back to the cyan average. If the candle body closes below, find your exit. In this case price pays right away. Move your stop to break even once it passes the 200 MA on the 5 min. Use your rules for management and rake in profits. The way price reacts around this average gives a lot of tells of where it will move to. Only get in at this average (1-2 ticks above or below) only and there's a high probability you will at least be able to get a tick out of the trade even if it fails. But for me when the PBF turns over and this pattern shows it usually continues. All the way to the right you can see the up move break down and the cyan average has caught up but look how price doesn't know what to do. It opens below but retraces back to the cyan average, 4 candles worth and then falls. If you're thinking why not go after the cross in the middle (around 14:44) because price crosses but doesn't retrace back to the average. Also, the average kept moving up, it should be flat. Just watch TTM Squeeze Average for a few days and you'll see the patterns. 15127 Volume Bars on the ES works for me but you might need to find the best chart length for the best results. Best of luck thehaul