Koalems

Fusion: Trend and thresholds

Koalems מעודכן   
This is your basic single moving average but with a "slope" component. The idea here is that once a slope reaches a value great enough you should probably only trade with the trend so this indicator allows you to set that threshold separately for going long and short.

The indicator is designed to display on both the main chart and a separate chart area. If you want to display it on the main chart then the quick way is to just check the "On main chart" option and it will disable off main chart items and then just move it to the main chart.

There's half a dozen or so moving average types to select from so you will probably find one that suits you pretty well.

Once a threshold is reached you will get a signal showing the trend is strong enough where you probably should not trade in the opposite direction.

There is a "normalize" option which will fix the oscillator to a maximum of 100. The upside of this is that you can be more consistent in your settings of a threshold. The down side is that normalization happens over a predefined number of bars so it's a floating number, not an absolute number however I set the number of bars default to 3,000 so it should be pretty close to ideal. I haven't found a perfect way of getting a consistent maximum on the oscillator as a benchmark yet so if anyone has any ideas please contact me and I'll do an update. I may look into using percentage rank instead of normalization.

I like to see it as both an oscillator and on the main chart so I generally have two copies.

The settings are certainly not optimized so set to whatever suits your needs as my defaults will probably be wrong for you.

The code is structured to easily drop into a bigger system so use it as a lone indicator or add the code to some bigger project you are creating. If you do, send me a note, it would be nice to know it's being well used.

Finally, if you find value please do make a comment, give a thumbs up etc.

Enjoy and good luck!
הערות שחרור:
Replaced the use of normalization with percentile rank.
הערות שחרור:
Added a tooltip.
הערות שחרור:
Added option to color trend line with threshold information instead of the default which is just the direction of the trend.

Made a default a little more sensible.
סקריפט קוד פתוח

ברוח TradingView אמיתית, מחבר הסקריפט הזה פרסם אותו בקוד פתוח, כך שסוחרים יכולים להבין ולאמת אותו. כל הכבוד למחבר! אתה יכול להשתמש בו בחינם, אך שימוש חוזר בקוד זה בפרסום כפוף לכללי הבית. אתה יכול להכניס אותו למועדפים כדי להשתמש בו בגרף.

כתב ויתור

המידע והפרסומים אינם אמורים להיות, ואינם מהווים, עצות פיננסיות, השקעות, מסחר או סוגים אחרים של עצות או המלצות שסופקו או מאושרים על ידי TradingView. קרא עוד בתנאים וההגבלות.

רוצה להשתמש בסקריפ זה בגרף?