barnabygraham

Multiple Ticker Trader

barnabygraham Güncellendi   
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
Sürüm Notları:
Fixed invisible open value (green line)

Açık kaynak kodlu komut dosyası

Gerçek TradingView ruhuyla, bu betiğin yazarı, yatırımcının anlayabilmesi ve doğrulayabilmesi için onu açık kaynak olarak yayınladı. Yazarın eline sağlık! Bunu ücretsiz olarak kullanabilirsiniz, ancak bu kodun bir yayında yeniden kullanımı Kullanım Koşulları ile yönetilir. Bir grafikte kullanmak için favorilere ekleyebilirsiniz.

Feragatname

Bilgiler ve yayınlar, TradingView tarafından sağlanan veya onaylanan finansal, yatırım, işlem veya diğer türden tavsiye veya tavsiyeler anlamına gelmez ve teşkil etmez. Kullanım Şartları'nda daha fazlasını okuyun.

Bu komut dosyasını bir grafikte kullanmak ister misiniz?