barnabygraham

Multiple Ticker Trader

barnabygraham Cập nhật   
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
Phát hành các Ghi chú:
Fixed invisible open value (green line)

Mã nguồn mở

Với tinh thần TradingView, tác giả của tập lệnh này đã xuất bản nó dưới dạng mã nguồn mở, vì vậy các nhà giao dịch có thể hiểu và xác minh nó. Chúc mừng tác giả! Bạn có thể sử dụng mã này miễn phí, nhưng việc sử dụng lại mã này trong một ấn phẩm chịu sự điều chỉnh của Nội quy nội bộ. Bạn có thể yêu thích nó để sử dụng nó trên biểu đồ.

Thông báo miễn trừ trách nhiệm

Thông tin và ấn phẩm không có nghĩa là và không cấu thành, tài chính, đầu tư, kinh doanh, hoặc các loại lời khuyên hoặc khuyến nghị khác được cung cấp hoặc xác nhận bởi TradingView. Đọc thêm trong Điều khoản sử dụng.

Bạn muốn sử dụng tập lệnh này trên biểu đồ?