f10409

Strategy Based on trends evaluated at different time resolutions

f10409 ที่อัปเดต:   
The trends are evaluated using moving averages (both EMA and SMA ) with different periods and time resolutions.
The default resolutions for the small, median, and large resolutions are day(D), week(W), and month(M), respectively.
And the default periods for the short, median, and long periods are moving averages are 20, 60, and 120, respectively.

The buy signal is triggered when the following conditions are all met:

@ Small resolution:
1. The distances between the short-period MA (s) and median-term MA (m), and between the median-period MA and long-term MA (l), are small (default: 0% < (1-s/m) and (1-m/l) < 5%).
2. Prices (c) > s, m, and l. i.e. c/s, c/m, and c/l > 1.0.
3. up-trends of s, m, and l.

@ Median resolution:
1. The distances between the short-period MA (s) and median-term MA (m), and between the median-period MA and long-term MA (l), are small (default: abs(1-s/m) < 3% and abs(1-m/l) < 5%).
2. Prices (c) > s, m, and l. i.e. c/s, c/m, and c/l > 1.0.
3. up-trends of s.

@ Large resolution:
1. The distances between the short-period MA (s) and median-term MA (m), and between the median-period MA and long-term MA (l), are small (default: abs(1-s/m) < 3% and abs(1-m/l) < 5%).
2. Prices (c) > s, m, and l. i.e. c/s, c/m, and c/l > 1.0.
3. Up-trend of s.

The close signal is triggered when the following conditions are all met:

@ Small resolution:
1. Prices (c) < s.
2. Down-trend of s.

On the separated chart, the s/m for different time resolutions are shown. The dotted line is the s/m calculated using EMA for the small time resolution.
The orange triangles represent when the prices are larger than all moving averages.
One can choose to have the m/l also plotted from the settings.

Attention:
1. The strategy needs to display at the smallest time resolution set in order to get correct results.
2. This strategy is for learning purpose only. Using it to make trading decisions will lead to money loss.

The design concepts are mostly inspired by 雷公.
เอกสารเผยแพร่:
some bugs fixed
เอกสารเผยแพร่:
Remove sma based s/m and m/l from chart
เอกสารเผยแพร่:
bugs fixed
เอกสารเผยแพร่:
0405
เอกสารเผยแพร่:
add input for stop loss
สคริปต์ที่ได้รับการป้องกัน
สคริปต์นี้เผยแพร่แบบปิดและคุณสามารถใช้มันได้อย่างอิสระ คุณสามารถตั้งเป็นรายการโปรดเพื่อใช้บนชาร์ตได้แต่คุณจะไม่สามารถดูหรือแก้ไขซอร์สโค้ดได้
คำจำกัดสิทธิ์ความรับผิดชอบ

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

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