Forum

how to calculate open high low close chart of a spread?

I am currently trying to develop an indicator that plots a candlestick chart of a spread (distance between two currency pairs of choice). To work out open and close for spread is fairly simple as open and close will always happen at the same time so you just subtract open and close

Getting normalised price from another timeframe

Hi I normalised the distance between (EURGBP-EURUSD) and (EURUSD-GBPUSD). Below is the code; Now, I want to create separate variables to store normalised values of other timeframes i.e 15min 60min regardless which timeframe I am currently on so I can comment those on the chart. Can someone help on

Bollinger band on spread

Hi guys, I am a beginner at coding and I tried to code and apply bollinger band on closing prices of a spread ( (EURGBP-EURUSD)-(EURUSD-GBPUSD)) but the band always seem to be containing the closing price i.e the price never cross either upper or lower band so I thought I'd ask someone to check out

Array out of range

Hi I am keep getting array out of range errors. Could anyone please tell me how to fix this? Indicator seems to plot well the fly price, moving averages but when I add the code for standard deviation calculation, I keep getting the error message. Much appreciated for any help