Untested, but here is the simplest for scanner. QQQ is still on the list.@barbaros - Any news or developments figuring out a scan for Alpha Trend indicator or the coding for the QQQ RelaxedTrader strategy? Just curious.
# AlphaTrend Scanner
# Converted for https://b4indicators.com/threads/alpha-trend.174/
# v1.0 - barbaros
input coeff = 1.0;
input AP = 14;
input src = close;
input noVolumeData = no;
input paintBars = no;
def _ATR = ATR(AP);
def upT = low - _ATR * coeff;
def downT = high + _ATR * coeff;
def AlphaTrend = if BarNumber() == 1 then 0
else if (if novolumedata then RSI(price=src, length=14) >= 50 else MoneyFlowIndex(length=14) >= 50) then
if upT < AlphaTrend[1] then AlphaTrend[1] else upT
else
if downT > AlphaTrend[1] then AlphaTrend[1] else downT;
def k1 = AlphaTrend;
def k2 = AlphaTrend[2];
def direction = if BarNumber() == 1 then 0
else if direction[1] != 1 and crosses(AlphaTrend, AlphaTrend[2], CrossingDirection.ABOVE) then 1
else if direction[1] != -1 and crosses(AlphaTrend, AlphaTrend[2], CrossingDirection.BELOW) then -1
else direction[1];
plot buySignal = direction == 1 and direction[1] != 1;
plot sellSignal = direction == -1 and direction[1] != -1;
# AlphaTrend Scanner
# Converted for https://b4indicators.com/threads/alpha-trend.174/
# v1.0 - barbaros
input coeff = 1.0;
input AP = 14;
input src = close;
input noVolumeData = no;
input paintBars = no;
def _ATR = ATR(AP);
def upT = low - _ATR * coeff;
def downT = high + _ATR * coeff;
def AlphaTrend = if BarNumber() == 1 then 0
else if (if novolumedata then RSI(price=src, length=14) >= 50 else MoneyFlowIndex(length=14) >= 50) then
if upT < AlphaTrend[1] then AlphaTrend[1] else upT
else
if downT > AlphaTrend[1] then AlphaTrend[1] else downT;
def k1 = AlphaTrend;
def k2 = AlphaTrend[2];
def direction = if BarNumber() == 1 then 0
else if direction[1] != 1 and crosses(AlphaTrend, AlphaTrend[2], CrossingDirection.ABOVE) then 1
else if direction[1] != -1 and crosses(AlphaTrend, AlphaTrend[2], CrossingDirection.BELOW) then -1
else direction[1];
plot buySignal = direction == 1 and direction[1] != 1;
# AlphaTrend Scanner
# Converted for https://b4indicators.com/threads/alpha-trend.174/
# v1.0 - barbaros
input coeff = 1.0;
input AP = 14;
input src = close;
input noVolumeData = no;
input paintBars = no;
def _ATR = ATR(AP);
def upT = low - _ATR * coeff;
def downT = high + _ATR * coeff;
def AlphaTrend = if BarNumber() == 1 then 0
else if (if novolumedata then RSI(price=src, length=14) >= 50 else MoneyFlowIndex(length=14) >= 50) then
if upT < AlphaTrend[1] then AlphaTrend[1] else upT
else
if downT > AlphaTrend[1] then AlphaTrend[1] else downT;
def k1 = AlphaTrend;
def k2 = AlphaTrend[2];
def direction = if BarNumber() == 1 then 0
else if direction[1] != 1 and crosses(AlphaTrend, AlphaTrend[2], CrossingDirection.ABOVE) then 1
else if direction[1] != -1 and crosses(AlphaTrend, AlphaTrend[2], CrossingDirection.BELOW) then -1
else direction[1];
plot sellSignal = direction == -1 and direction[1] != -1;
What did you pick as the timeframe?Hi, Barbaros, I set up those two ToS scans exactly like you said to do but they don't return anything, even after I remove my usual stock price and volume filters. Would you please publish shared links so I can give them a try?
The default of Daily. I went back through all the posts and don't see anything that suggests otherwise.What did you pick as the timeframe?
Any feedback on my reply?What did you pick as the timeframe?
It worked when I tried, I’ll test it again.Any feedback on my reply?