Fining High open low close of the previous candle
Show some more info what is being printed?
Print candleIndex to confirm if its value is 1 (previous candle) and not invalid
you can also troubleshoot like this
if(openPrice==0) Print(GetLastError()); else Print("Open is ",openPrice);
Improperly formatted code edited by moderator. Please use the CODE button (Alt-S) when inserting code.
Show some more info what is being printed?
Print candleIndex to confirm if its value is 1 (previous candle) and not invalid
you can also troubleshoot like this
I figured out my mistake, which didnt actually lie in the coding, I was checking my OHLC values with candlestick data from 2023 instead of 2024.
Bit of a silly error, but thanks for coming back to me nonetheless
This is my code, could anyone explain or give any reasons as to why it doesnt just print the high low open and close of the previous candle, it just produces other incorrect values.
candleIndex is set to 1