TradingView
ChrisMoody
20 Th11 2014 15:53

CM ATR Stops/Bands - Multi-TimeFrame 

SPDR S&P 500 ETF TRUSTArca

Mô tả

CM_MTF ATR Bands/Stops

Many Options Available Via Input Tab:
-Chart Defaults to Upper and Lower ATR's Based on Current Chart TimeFrame
-Ability to Plot either Upper and/or Lower ATR's
-Ability to Change the Time Frame ATR's are Based On!
-Ability to change Look Back Period and ATR Multiplier Individually for Both Time Frames
-This Gives you the ability to plot same Time Frame with (for ex.) a 5 ATR with a 1.5 Mult and a 14 ATR with a 2.0 Mult etc.
-Or you can plot Daily ATR's on a 60 minute Chart etc.
-ATR Multipliers are Calculated with Code that allows "Non Whole Numbers" Allowing Ability to use 1.5 ATR's, 1.8 ATR's etc.

***Endless # of Combinations can be used!!!!
Bình luận
nutsatlarge
Chris. What ever you make when you make is unique, different and super performer. Chris i have a request can you make a supertrend indicator which shows a higher time frame trend and in lower time frame we can take a trade. that will be great help to retailers although there are certain but confusing.
Higher time frame:- Daily, Weekly, Monthly,
Snipper Trading Frame Entry/ Exit:- 15,30, hourly.

Will wait for a positive response.
Omni-Trading
@nutsatlarge, I think hes gone
ChrisMoody
@OmniTekTrading, I'm back....
NHARISH
hello chris,
I am newbie to trading.....And just now i watched a youtube video on this indicator(youtube.com/watch?v=3gNxBYL1oJU&list=PLP1qMpUAau2A3fWBSqYeKP3ZOR997VUWz&index=1)by TTM..can you code it please for trading view community
ChrisMoody
I hope you understand...I've known John and Hubert from TTM for a long time. I never take there codes and post them. There are a lot of talented coders in the pine script editor chat that would be willing to help you if you ask them nicely.
Alphaoptions
You are on a roll! Two questions: 1) Could there an option to flip the ATR band with the trend? 2) Could there be more decimal places to the ATR multiple (e.g. 1.618 versus 1.6 - I think this is entered as 16 currently and it translates to 1.6).
ChrisMoody
The second part is simple...take this part of the code...right under the inputs
Step 1
//Multiplier Calculation
Xmult = mult * .1
//Optional 2nd Bands
Xmult2 = mult2 * .1

The * .1 takes 15 and makes it 1.5 therefore if you changed it to .001 then the multiplier would need to be 1618

So end result would be
//Multiplier Calculation
Xmult = mult * ..001
//Optional 2nd Bands
Xmult2 = mult2 * .001

Step 2
In inputs section take the mult and mult2 Input and change the maxval setting from 40 to as high as you would want it, or you can take that parameter out all together. also set the default input to 1000 or so...or 1618 if thats the default setting your going to use.

End Result: Replace the first two lines in Inputs tab, and then the code a few lines below the inputs tab to this.

mult = input(1618, minval=1000, maxval=5000, title="Value X .1, 1000=1 (No Multiplier), 1618=1.618 times ATR Value")
mult2 = input(1618, minval=1000, maxval=5000, title="Value X .1, 1000=1 (No Multiplier), 1618=1.618 times ATR Value - Optional 2nd ATR Bands Plot")

//Multiplier Calculation
Xmult = mult * ..001
//Optional 2nd Bands
Xmult2 = mult2 * .001

Let me know if it doesn't work...but it should.
ChrisMoody
First band is 1.618, 2nd band is 2.618 using the code above

Alphaoptions
I must have made a mistake. I could not get it to work.
Alphaoptions
Unfortunately it did not like it. It just left me without a plot of anything. I am very new to the group and coding so I may have made a mess of it. I am thinking of using it with the HiLo you posted earlier. It might get a busy chart but it would give a view of trend and the stop / entry, re-entry points. It would be way cool if the two scripts could be merged so that the ATR and its stop plot only when in same direction as HiLo as it would be cleaner (i.e. just on one side). Having these giving the stop, trend, pullback areas along the way to the next target (like your Pivot bands, then it would be quite a complete approach). Pulling all of them together. If used with the bands (as a separate script), it would be even more important to plot the ATR on one side - or so it would seem?
Thêm nữa