OPEN-SOURCE SCRIPT
Trade with Treand

Think of this script as a filter and a signal light for trading Gold. It helps you avoid trading in the wrong direction and tells you exactly when the price momentum is shifting.
The Three Main Parts
The Ultimate Trend (The Filter):
This is the big table in the top-right corner.
Bullish (Green): Only look for BUY signals.
Bearish (Red): Only look for SELL signals.
It uses a "300 SMA" (a long-term average) to make sure you aren't "swimming against the tide."
The Entry Signals (The Crossover):
The script watches two lines on your chart (a 20-period and a 10-period).
When they cross, it places a BUY or SELL label on your screen.
The 4 Alerts (The Notifications):
You don't have to stare at the screen all day.
You get a notification for Buy entries, Sell entries, or when the Main Trend flips from Bullish to Bearish (or vice versa).
Simple Rules for Trading
To be successful with this script, follow these four rules:
Rule 1: Check the Table. If it says "Bearish," ignore all "BUY" labels.
Rule 2: Wait for the Label. Only enter a trade when a "BUY" or "SELL" label appears and it matches the trend table.
Rule 3: Protect Your Money. Look at the last 5 candles. Put your Stop Loss just past the highest or lowest point of those candles.
Rule 4: Aim for the Target. Your profit target should be at least double the amount of money you are risking (Risk:Reward 1:2).
How to use the Settings
When you click the Settings icon on the script, you can change:
SMA Filter: Change the "300" if you want the trend to be faster or slower.
Trend Gap: Adjust how far the trailing line stays away from the price.
The Three Main Parts
The Ultimate Trend (The Filter):
This is the big table in the top-right corner.
Bullish (Green): Only look for BUY signals.
Bearish (Red): Only look for SELL signals.
It uses a "300 SMA" (a long-term average) to make sure you aren't "swimming against the tide."
The Entry Signals (The Crossover):
The script watches two lines on your chart (a 20-period and a 10-period).
When they cross, it places a BUY or SELL label on your screen.
The 4 Alerts (The Notifications):
You don't have to stare at the screen all day.
You get a notification for Buy entries, Sell entries, or when the Main Trend flips from Bullish to Bearish (or vice versa).
Simple Rules for Trading
To be successful with this script, follow these four rules:
Rule 1: Check the Table. If it says "Bearish," ignore all "BUY" labels.
Rule 2: Wait for the Label. Only enter a trade when a "BUY" or "SELL" label appears and it matches the trend table.
Rule 3: Protect Your Money. Look at the last 5 candles. Put your Stop Loss just past the highest or lowest point of those candles.
Rule 4: Aim for the Target. Your profit target should be at least double the amount of money you are risking (Risk:Reward 1:2).
How to use the Settings
When you click the Settings icon on the script, you can change:
SMA Filter: Change the "300" if you want the trend to be faster or slower.
Trend Gap: Adjust how far the trailing line stays away from the price.
نص برمجي مفتوح المصدر
بروح TradingView الحقيقية، قام مبتكر هذا النص البرمجي بجعله مفتوح المصدر، بحيث يمكن للمتداولين مراجعة وظائفه والتحقق منها. شكرا للمؤلف! بينما يمكنك استخدامه مجانًا، تذكر أن إعادة نشر الكود يخضع لقواعد الموقع الخاصة بنا.
إخلاء المسؤولية
لا يُقصد بالمعلومات والمنشورات أن تكون، أو تشكل، أي نصيحة مالية أو استثمارية أو تجارية أو أنواع أخرى من النصائح أو التوصيات المقدمة أو المعتمدة من TradingView. اقرأ المزيد في شروط الاستخدام.
نص برمجي مفتوح المصدر
بروح TradingView الحقيقية، قام مبتكر هذا النص البرمجي بجعله مفتوح المصدر، بحيث يمكن للمتداولين مراجعة وظائفه والتحقق منها. شكرا للمؤلف! بينما يمكنك استخدامه مجانًا، تذكر أن إعادة نشر الكود يخضع لقواعد الموقع الخاصة بنا.
إخلاء المسؤولية
لا يُقصد بالمعلومات والمنشورات أن تكون، أو تشكل، أي نصيحة مالية أو استثمارية أو تجارية أو أنواع أخرى من النصائح أو التوصيات المقدمة أو المعتمدة من TradingView. اقرأ المزيد في شروط الاستخدام.