JamesFrost: 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.
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.
Rajesh Kumar Nait #:
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

You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
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