I have been trying to learn to code some super simple price action indicators, but I cannot seem to find any information on how to read and get data from bars, help with if statements, how to create loops, paint bars, etc… - All I can do is open up someone else’s code and try to guess from there.
Here are some of the simple things I would like to figure out:
- How can I get the price (open, close, high, low) of 5 bars ago? d.close(5) or prior.close(5) does not seem to work.
- How can I set different type of variables (integers, booleans, etc…)
Any help will be appreciated.