Description: ============= This indicator plots MAs and paints Triggered Alert Arrows base on Flying Buddha candle patterns.
The “Flying Buddha” Pattern is defined as: --------------------------------------------- A candlestick chart with two moving averages: the 5 period exponential moving average (fast EMA) and the 10 period simple moving average (slow SMA), both applied to the closing price. The default “Flying Buddha” pattern is any candlestick which:
1. Has a LOW above the fast EMA, when the fast EMA is above the slow SMA (a bearish “Flying Buddha”); or
2. Has a HIGH below the fast EMA, when the fast EMA is below the slow SMA (a bullish “Flying Buddha”).
Alert Trigger: --------------- A Flying Buddha Alert is triggered on the first candle that is a non-flying Buddha candle after a Flying Buddha Pattern candle sequence. Flying Buddhas can optionally be filtered by InsideBars and PinBars.
The Alert Trigger is optionally filtered by the Directional MA (default=EMA 89), and/or by Minimum Sequence length of Flying Buddhas.
Moving Averages: ------------------ You can select between 11 different types of moving averages, for each MA line in Flying Buddha MAs (fastMA and slowMA) and the Directional Filter MA:
The formula for making a 1-day Fibonacci line.
Can you take a look at the formula?
What's wrong is not working.
study(title="day fibo", overlay=true)
pl=input(100)
a=valuewhen(1,highest(high,p1),highest(high,p1));
b=valuewhen(1,lowest(low,p1),lowest(low,p1));
ab=a-((a-b)*0.236)
plot(ab)