levieux

Monthly Returns in Strategies with Market Benchmark

levieux تم تحديثه   
This is a modified version of this excellent script Monthly Returns in PineScript Strategues by QuantNomad

I liked and used the script but wanted to see how strategy performed vs market on each month/year. So I am sharing back.

The modification consists in adding Market or Buy & Hold performance between parenthesis inside each cell to better see how strategy performed vs market.

Also, 3 red levels and 3 green levels have been used :
For green :
1/ Light when strategy pnl > 0 but < market
2/ medium when strategy pnl > 0 and > market
3/ Dark when strategy pnl > 0 and market < 0 or pnl > market x 2

Same logic in the opposite direction for red.

The strategy provided here is just a showcase of how to use the table in pine script.

Disclaimer
Please remember that past performance may not be indicative of future results.
Due to various factors, including changing market conditions, the strategy may no longer perform as well as in historical backtesting.
This post and the script don’t provide any financial advice.
ملاحظات الأخبار:
Refactor code
ملاحظات الأخبار:
Fixed bug with red color level
ملاحظات الأخبار:
Get number precision as input (0 => no digit after the decimal point, 1 => 1 digit after decimal point etc.)

نص برمجي مفتوح المصدر

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

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

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

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