Candlestick AFL

Good day

Can someone please help me out giving AFL of candlestick. My requirment is

  1. Pinbar (no matter color of pin) candle.
    (Atleast 70% of candle pin.
  2. One white soldier.

It will be also good enough if above two candle touch EMA 50.

Pls help me

Hello @himorokon,

Can you pls advise what efforts you've made to find the underlying algorithms used to define the candle formations you're interested in. Provide descriptions/ links/ etc.

What attempts have you made to program them? Show your code.

Also, it would help us greatly, if you followed the advice outlined in the following topic:

By providing us with more, and better quality information, we can help you more quickly, without having to assume what you want.


it would be better to read this link first

Good day

According my capability, i gave my all effort first.
I tried to findout any parralel AFL, but regret, i didnt find.
Since i am not technical guys, i dont have any background of creating AFL programming.
I am simple investor, thus it would be really greatfull if someone help me.
Or show me how to programme AFL.

I may assist you giving chart what actually i am looking for.

Thanks for your valuable comment pls

@himorokon, we were all "simple investors" at one point, but most have put in a lot of effort since then.

It appears that you haven't read or applied the contents of the links provided to you, and you're asking someone to give you the keys to a million dollars, without providing anything in return!

You mentioned a chart, but didn't even bother to attach it. How can anyone help you, if you're not willing to help yourself?


Please define what a "pin" bar is.

What do you mean by "just touch"

What does "EMA" mean?

1 Like

Is the "TALE" above or below the body?

What does "just touches" mean?

Dear sir, further to " Just touch " its not significant something.
I meant Candle tale touch EMA 50. this is requirement.

So your Setup Bar is a pin bar with the low of the pin bar equal or less than the 50 EMA?

What exactly is your Trigger Bar condition?

1 Like

Dear Sir

Technically we called " bullish & bearish pinbar"
Bullish Pinbar: minimum 70% candle tale in lower, maximum 30% body is candle upper side.
Bearish Pinbar: minimum 70% candle tale in upperside, 30% body is candle lower side.

Condition One: Bullish/Bearish Pinbar candle
condition 2: It tale touch EMA 50.

So you want your Setup Bar and Trigger Bar to be purely based off just the pin bar?

1 Like

Exactly Sir, based on PIN Bar
i tried a lot of finding pure PINBAR pattern. But regret, i didnt find such.

How do you define "body" of the candle?

What do you mean by "It tale touch"?

1 Like

Dear Sir,
Please see Tale candle..
body: what filled with color
TAIL: Narrow PIN.

And i am extremely sorry for my bad english

it should be " TAIL"

Is this what you are after?

closingRange = 100 * ((Close - Low) / (High - Low));

pinBar = closingRange >= 70;

Buy = pinBar AND Low <= EMA(Close, 50);
1 Like


Many unwanted signal.. But one signal correct
i color it.

Please provide a description, in words, not pictures.

Pictures help to explain what you want, but they lack precision. Unfortunately, what you want need to be more clearly specified, particularly as there are many ways of achieving it.

How do you define "body" of the candle?

What do you mean by "just touches"?

1 Like

Arr - sorry,

Try this:

closingRange = 100 * ((Close - Low) / (High - Low));

pinBar = closingRange >= 70;

Buy = pinBar AND Low <= EMA(Close, 50) AND Close > EMA(Close, 50);


Sorry for another picture

  • Pls find my color 3 candle.
    All created bearish PIN: means its tail touch " EMA 50"
    exactly i want this kind of.

i looking for such candle (many people say it hammer/DOJI ETC) , A candle what is maximum is 30% full with color. but its minimum 70% (it may 80/90/100%) TAIL.