To Find Trending Stocks
Scan for Price crossing above Hullma and MACD crossing above 0
This is a script is written for the SCAN HACKER only.
As such, you can stuff this code straight into the scanner.
These scripts have been updated, to clean up some logic:
This script is written for WATCHLIST column only.
color key:
cyan = macd cross above 0 and hull cross above 200
green = macd above 0 and hull above 200
red = macd below 0 and hull below 200
gray = macd below 0 OR hull below 200
Scan for Price crossing above Hullma and MACD crossing above 0
This is a script is written for the SCAN HACKER only.
As such, you can stuff this code straight into the scanner.
These scripts have been updated, to clean up some logic:
Ruby:
#Scan for Price crossing above Hull and MACD crossing above 0
input fast = 12; input slow = 26; input Length = 5;
def nMACD = MACD(fastLength = fast, slowLength = slow, MACDLength = Length);
input hullLEN = 200;
def hullAVG = HullMovingAvg(length = hullLEN);
plot scan =
((nMACD crosses above 0 within 3 bars) and close crosses above hullAVG)
or
(nMACD crosses above 0 and (close crosses above hullAVG within 3 bars));
This script is written for WATCHLIST column only.
color key:
cyan = macd cross above 0 and hull cross above 200
green = macd above 0 and hull above 200
red = macd below 0 and hull below 200
gray = macd below 0 OR hull below 200
Ruby:
# Watchlist for Price above Hull and MACD above 0
input fast = 12; input slow = 26; input Length = 5;
plot nMACD = MACD(fastLength = fast, slowLength = slow, MACDLength = Length);
input hullLEN = 200;
def hullAVG = HullMovingAvg(length = hullLEN);
plot scan =
((nMACD crosses above 0 within 3 bars) and close crosses above hullAVG)
or
(nMACD crosses above 0 and (close crosses above hullAVG within 3 bars));
AssignBackgroundColor(
if scan then color.cyan else
if nMACD > 0 and close > hullAVG then color.green else
if nMACD < 0 and close < hullAVG then color.red else color.gray);
Last edited: