|
David
2022-07-05 00:44:22
|
|
Hi
I'm slowing writing a function that will give me what I currently think will be useful metrics when simulations are run.
The actual function most likely won't have a visual output, but for testing I am creating a visual output as it shows if my code is correct.
So say I'm looking at adding lines to the highs and lows of "close" data for the last 40 bars, I can create this in a array, I can then work out the line formula between each HL point,
but outputting this line/lines visually is the fun part.
The only way I think this can be done is by creating a copy of the array you are examining, and where the newly calculated lines start and stop patch the array with the new line data formula.
Plotting this newly created array outside the function will then show / overlap the current data with the line modifications in the correct place.
Is there a line drawing function accessible to functions that may make this easier?
Is there another/better way this can be done?
Thanks
|
|