I'm using the "drawShapeRelative" to place a diamond above the high of a bar that meets my criteria. This works fine EOD but is not working correctly with interday / streaming data for 5, 10, 30 minute charts etc..
I have to reload my efs after almost every bar to get the correct results.
What do I have to add to the "drawShapeRelative" statement so that the diamond will only draw or redraw when the bar is done.
For Example:
Now during / while a 5 minute bar is developing a shape (diamond) is being drawn with each data update and results in multiple shapes being drawn all over the bar. Sometimes the bar can meet my criteria initially while the bar is developing but then no longer meets the criteria by the time the bar is complete. In this case there should be no shape associated with the bar but because shapes were drawn initially they do not get removed.
What should happen is that as new data is received all data for that bar should be re-evaluated and a single shape should be drawn if the criteria is met.
So, what do I have to add to the "drawShapeRelative" statement so that only one diamond will appear as new data is accumulated during the bar development and at the end of the bar if the criteria is met???
I have to reload my efs after almost every bar to get the correct results.
What do I have to add to the "drawShapeRelative" statement so that the diamond will only draw or redraw when the bar is done.
For Example:
Now during / while a 5 minute bar is developing a shape (diamond) is being drawn with each data update and results in multiple shapes being drawn all over the bar. Sometimes the bar can meet my criteria initially while the bar is developing but then no longer meets the criteria by the time the bar is complete. In this case there should be no shape associated with the bar but because shapes were drawn initially they do not get removed.
What should happen is that as new data is received all data for that bar should be re-evaluated and a single shape should be drawn if the criteria is met.
So, what do I have to add to the "drawShapeRelative" statement so that only one diamond will appear as new data is accumulated during the bar development and at the end of the bar if the criteria is met???
Comment