Scan for no bottom wick candle no touching 5 ema

kabira

Member
VIP
min(open,close) == low and !between(expaverage(close,5),low,high) trying to convert this using HeinkenAshi instead of regular candle..

I am trying the below but not working. any advice how to fix it please.

def haClose = ohlc4;
def haOpen = if haOpen[1] == 0 then haClose[1] else (haOpen[1] + haClose[1]) / 2;
def haHigh = Max(high, Max(haClose, haOpen));
def haLow = Min(low, Min(haClose, haOpen));
min(haOpen,haClose) == haLow and !between(expaverage(close,5),haLow,haHigh)
 
Last edited by a moderator:
Solution
I am not very familiar with meme bars, but assuming that the rest of it is correct, my best guess would be this:

def haClose = ohlc4;
def haOpen = if haOpen[1] == 0 then haClose[1] else (haOpen[1] + haClose[1]) / 2;
def haHigh = Max(high, Max(haClose, haOpen));
def haLow = Min(low, Min(haClose, haOpen));
plot Scan = min(haOpen,haClose) == haLow and !between(expaverage(haClose,5),haLow,haHigh);

If not I can take a deeper look into it.

7rNEL3W.png


Works fine on my end. Are you showing the 5EMA of regular closes, or HA closes? That is likely where the discrepancy is.
I am not very familiar with meme bars, but assuming that the rest of it is correct, my best guess would be this:

def haClose = ohlc4;
def haOpen = if haOpen[1] == 0 then haClose[1] else (haOpen[1] + haClose[1]) / 2;
def haHigh = Max(high, Max(haClose, haOpen));
def haLow = Min(low, Min(haClose, haOpen));
plot Scan = min(haOpen,haClose) == haLow and !between(expaverage(haClose,5),haLow,haHigh);

If not I can take a deeper look into it.

7rNEL3W.png


Works fine on my end. Are you showing the 5EMA of regular closes, or HA closes? That is likely where the discrepancy is.
 
Solution

Join useThinkScript to post your question to a community of 21,000+ developers and traders.

Hey,
min(open,close) == low and !between(expaverage(close,5),low,high) trying to convert this using HeinkenAshi instead of regular candle..

I am trying the below but not working. any advice how to fix it please.

def haClose = ohlc4;
def haOpen = if haOpen[1] == 0 then haClose[1] else (haOpen[1] + haClose[1]) / 2;
def haHigh = Max(high, Max(haClose, haOpen));
def haLow = Min(low, Min(haClose, haOpen));
min(haOpen,haClose) == haLow and !between(expaverage(close,5),haLow,haHigh)
my friend, I’m looking for the same but regular candles, do you know how to do the code?
Thanks for your help!
 
Hey Kabira, thanks for your help my friend, if may I abuse a little more of your help, I saved this as study in my tos but its not showing any signal in my chart , do you know what I’m missing?

Thanks again!
 
Put that in the study of the scan and you will get the results. It is a scan to find the stocks which is not touching 5 EMA not a study to put on chart,


Below is the code to put on chart

input length = 5;

plot ema = ExpAverage(close, length);

#AssignPriceColor(if low > ema then getColor(6) else if high < ema #then getColor(5) else getColor(7));

plot signalHigh = low > ema;
signalHigh.DefineColor("Above", GetColor(1));
signalHigh.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_DOWN);

plot signalLow = high < ema;
signalLow.DefineColor("Below", GetColor(2));
signalLow.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_UP);
 

Similar threads

Not the exact question you're looking for?

Start a new thread and receive assistance from our community.

87k+ Posts
314 Online
Create Post

Similar threads

Similar threads

The Market Trading Game Changer

Join 2,500+ subscribers inside the useThinkScript VIP Membership Club
  • Exclusive indicators
  • Proven strategies & setups
  • Private Discord community
  • ‘Buy The Dip’ signal alerts
  • Exclusive members-only content
  • Add-ons and resources
  • 1 full year of unlimited support

Frequently Asked Questions

What is useThinkScript?

useThinkScript is the #1 community of stock market investors using indicators and other tools to power their trading strategies. Traders of all skill levels use our forums to learn about scripting and indicators, help each other, and discover new ways to gain an edge in the markets.

How do I get started?

We get it. Our forum can be intimidating, if not overwhelming. With thousands of topics, tens of thousands of posts, our community has created an incredibly deep knowledge base for stock traders. No one can ever exhaust every resource provided on our site.

If you are new, or just looking for guidance, here are some helpful links to get you started.

What are the benefits of VIP Membership?
VIP members get exclusive access to these proven and tested premium indicators: Buy the Dip, Advanced Market Moves 2.0, Take Profit, and Volatility Trading Range. In addition, VIP members get access to over 50 VIP-only custom indicators, add-ons, and strategies, private VIP-only forums, private Discord channel to discuss trades and strategies in real-time, customer support, trade alerts, and much more. Learn all about VIP membership here.
How can I access the premium indicators?
To access the premium indicators, which are plug and play ready, sign up for VIP membership here.
Back
Top