Array help
Posted: Mon Feb 21, 2022 11:21 pm
Hey guys! I just found this place today! very excited to start reading and learning more.
I found here because I have a problem with arrays, I don't really understand them or how to use them but the script I'm building is going to need me to use them!
So I want to build a Fair Value Gap indicator that will only plot the 10 closest fair value gaps.
Of course as price moves on it will create more FVG's. but price can trend far far away before returning. I don't entirely want to delete those values as they will be used later as price retraces back. Is there a way for me to create example a 200 value array where as FVG's happen I can store and sort them.
Only plotting the closest 10 values and deleting the ones that get filled
extra: I would love to have the FVG candle change color once it gets filled aswell.
I have the logic down for the FVG where we can plot the Box extensions and then also delete them as they get filled. But as you already could assume it plots EVERY FVG. this clogs up computing and also the screen.
ANY help is very very much appreciated
I found here because I have a problem with arrays, I don't really understand them or how to use them but the script I'm building is going to need me to use them!
So I want to build a Fair Value Gap indicator that will only plot the 10 closest fair value gaps.
Of course as price moves on it will create more FVG's. but price can trend far far away before returning. I don't entirely want to delete those values as they will be used later as price retraces back. Is there a way for me to create example a 200 value array where as FVG's happen I can store and sort them.
Only plotting the closest 10 values and deleting the ones that get filled
extra: I would love to have the FVG candle change color once it gets filled aswell.
I have the logic down for the FVG where we can plot the Box extensions and then also delete them as they get filled. But as you already could assume it plots EVERY FVG. this clogs up computing and also the screen.
ANY help is very very much appreciated