Fibonacci bands with ATR

Category: Indicators By: Doctrading Created: September 15, 2016, 9:22 AM
September 15, 2016, 9:22 AM
Indicators
6 Comments

Hi all,

Here is a code from one of the visitors of my website : “Winnie37”.
He asked me to make a code of Fibonacci Bands with ATR, but I didn’t have the time to create it within the week, and I didn’t knew the formula.

So he coded it himself (congratulations !), and allowed me to publish it.
Here it is, simple and effective.

period = 20  //  à changer selon convenance

indicator1 = ExponentialAverage[period](close)
indicator2 = AverageTrueRange[period](close)

INDICATOR3= INDICATOR2*4.23
INDICATOR4=INDICATOR2*2.62
INDICATOR5=INDICATOR2*1.62
INDICATOR6=INDICATOR2*1

upperBand4 = INDICATOR1 + INDICATOR3
upperBand3 = INDICATOR1 + INDICATOR4
upperBand2 = INDICATOR1 + INDICATOR5
upperBand1 = INDICATOR1 + INDICATOR6
lowerBand4 = INDICATOR1 - INDICATOR3
lowerBand3 = INDICATOR1 - INDICATOR4
lowerBand2 = INDICATOR1 - INDICATOR5
lowerBand1 = INDICATOR1 - INDICATOR6

RETURN upperBand4 coloured(0,0,0),upperBand3 coloured(255,0,255),upperBand2 coloured(255,153,0),upperBand1 coloured(255,255,0),lowerBand4 coloured(0,0,0),lowerBand3 coloured(255,0,255),lowerBand2 coloured(255,153,0),lowerBand1 coloured(255,255,0)

Download
Filename: Fibonacci-Bands-with-ATR.itf
Downloads: 444
Doctrading Master
Hello, I'm Marc. Nice to meet you.
Author’s Profile

Comments

Logo Logo
Loading...