DuDu95

MA Simple Strategy with SL & TP & ATR Filters

Hello Guys! Nice to meet you all!
This is my second script!
This Logic is trend following logic, This detects long & short trends by comparing the value of MAs.
This fits to the longer time frame.

### Long Condition
1. Compare 4 MAs (you can chose MA Type)
- Shortest MA (MA 1)
- Shorter MA (MA 2)
- Normal MA (MA 3)
- Longer MA (MA 4)
2. If MA 1 > MA 2 > MA 3 > MA 4, then Enter Long Position
- ‘The arrangement of MAs in descending orders’ is the proxy of the long trend.

### Short Condition
1. Compare 4 MAs (you can chose MA Type)
- Shortest MA (MA 1)
- Shorter MA (MA 2)
- Normal MA (MA 3)
- Longer MA (MA 4)
2. If MA 1 < MA 2 < MA 3 < MA 4, then Enter Short Position
- ‘The arrangement of MAs in ascending orders’ is the proxy of the short trend.

### Close Condition
1. When trend Changes
- When (MA 1 > MA 2 > MA 3 > MA 4) breaks or (MA 1 < MA 2 < MA 3 < MA 4) breaks.
2. When the price hits the stoploss
3. When the price hits the take profit level (basically 50% of qty will be closed)

### Etc
1. Trend filter (ATR should be bigger than SMA of ATR)
- If the volatility of price is to small (ATR), then there could be false signal. To filter this out, I used the condition ‘ATR should be larger than SMA of ATR’.
2. Stoploss
- Enabled Stoploss based on ATR, Percent, Risk-Reward Ratio,
- Enabled Trailing Stoploss.
3. Choose MA Type
- You can choose MA Type

+ Thanks for the stoploss template @jason5480
نص برمجي مفتوح المصدر

قام مؤلف هذا النص البرمجي بنشره وجعله مفتوح المصدر، بحيث يمكن للمتداولين فهمه والتحقق منه، وهو الأمر الذي يدخل ضمن قيم TradingView. تحياتنا للمؤلف! يمكنك استخدامه مجانًا، ولكن إعادة استخدام هذا الكود في منشور تحكمه قواعد الموقع. يمكنك جعله مفضلاً لاستخدامه على الرسم البياني.

إخلاء المسؤولية

لا يُقصد بالمعلومات والمنشورات أن تكون، أو تشكل، أي نصيحة مالية أو استثمارية أو تجارية أو أنواع أخرى من النصائح أو التوصيات المقدمة أو المعتمدة من TradingView. اقرأ المزيد في شروط الاستخدام.

هل تريد استخدام هذا النص البرمجي على الرسم البياني؟