barnabygraham

Multiple Ticker Trader

barnabygraham ที่อัปเดต:   
This indicator can be used as an alternative to the built in Strategy Tester for those who want to (back) test a strategy on multiple tickers simultaneously and see it's performance.
Just change the buy and sell conditions in the code to fit your needs.

The strategy I've used here is scaling into up to 10 tickers a maximum of 5 times per ticker every time they retrace (another) 10% from their all time high.

You can set the maximum number of total trades and disable scale ins by setting them to an impossible number (such as, 99% away from the all time high).

Credit to QuantNomad for the monthly/yearly returns table bottom left.

The bottom right table shows the current number of shares the algo is long and also the total all-time returns from each individual ticker, and other data.

The blue line is the number of positions the script is currently long. Each scale into the same ticker represents one position.

The yellow line is the closed P&L.

The green/red line is the live P&L.

I've used leverage for the example image just to showcase the liquidation display.

These particular buy/sell conditions cannot close positions at a loss, so be careful if you're wild enough to use this setup live without understanding the script yourself. I haven't used it live myself yet and you should assume there are serious bugs before thinking about using it live, though I'm using a similar thing on cryptos and it's going fine.

You can edit the leverage, maximum trades and back test range in the settings. The number following the ticker on each label represents which scale in was bought/sold.

Enjoy :) let me know if you find any good results
เอกสารเผยแพร่:
Fixed invisible open value (green line)

สคริปต์โอเพนซอร์ซ

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

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

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

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