Calculating dispersion for basket of FX futures

Login or Register

Please login or register in order to view and post in the Forum.

1 post / 0 new
marcns
Last seen: 3 days 13 hours ago
Joined: 12/30/2021 - 10:46
Calculating dispersion for basket of FX futures

I'm looking to create a custom indicator within IRT that calculates the dispersion on a basket of 5 FX pairs on a 1m timeframe.

Yesterday I created this using pine script (image of code attached) but now I'm having trouble finding a way to do this within RTL.
Without being able to assign variables in RTL the calculation becomes increasingly complex and I'm not sure it's possible - after getting to the equivalent of line 19 (see pine script) in RTL I have hit a wall - any ideas?

*Update* There was a way to do this by breaking the calculations down with custom indicators and nesting the CI's within each other.

Thanks
Marcus

0