javabgar

[jav] Mountain Oscillator



Introducing the Mountain Oscillator. Why not trading while admiring the scenery?

The main oscillator line is the black silhouette of the mountains, and each element of the landscape can be seen as a support or resistance - even the mountains far in the horizon, the misty band in the middle and the -1, 0 and 1 lines. (Well, almost every element... the sun is just for fun).

Equalling the heights of the mountains that are far away, or reaching the snow zone, are possible signs of an uptrend ending. On the other hand, stepping into a river is a clear sign of a reversal to the upside soon.

Strong uptrends are evidenced by significant portions of the mountain above the misty zone and/or the 0 line.

By default, the sky turns red/blue/dark gray depending on the trading hours. This option can be unchecked.


Calculations and usage:

The script is based on a modified version of Bollinger Bands. Bandwidth is calculated quite differently from the usual Bollinger indicator (not with the built-in stdev function). There is no need to input a multiplier factor, such as that used in BB - the script calculates it from 'Length' using a custom formula.
The 3 user inputs 'Length' ares recommended to be kept at 200, 100 and 50 period. In that way, the misty area in the landscape corresponds to price crossing EMAs of 50 and 100, and the zero line to EMA 200.
The different colors of the mountain and the horizon represent the Bollinger Bands corresponding to the mentioned periods of 50 and 100, whereas limits of -1 and +1 are those from the 'Length' parameter.

You will find that my coding skills are rudimentary, so any comment/suggestion to improve the script is welcome.

Credits
@everget for the 'Fancy Shapes' script which was used as a reference to draw the sun.
สคริปต์โอเพนซอร์ซ

ด้วยจิตวิญญาณของ TradingView อย่างแท้จริง ผู้เขียนสคริปต์นี้ได้เผยแพร่เป็นโอเพนซอร์ส เพื่อให้ผู้ค้าสามารถเข้าใจและตรวจสอบได้ ไชโยให้กับผู้เขียน! คุณสามารถใช้ได้ฟรี แต่การใช้รหัสนี้ซ้ำในสิ่งพิมพ์อยู่ภายใต้กฎระเบียบการใช้งาน คุณสามารถตั้งเป็นรายการโปรดเพื่อใช้บนชาร์ตได้

คำจำกัดสิทธิ์ความรับผิดชอบ

ข้อมูลและบทความไม่ได้มีวัตถุประสงค์เพื่อก่อให้เกิดกิจกรรมทางการเงิน, การลงทุน, การซื้อขาย, ข้อเสนอแนะ หรือคำแนะนำประเภทอื่น ๆ ที่ให้หรือรับรองโดย TradingView อ่านเพิ่มเติมที่ เงื่อนไขการใช้บริการ

ต้องการที่จะใช้สคริปต์นี้บนชาร์ตใช่ไหม?