Got stumped with this one. I am trying to set a threshold at the highest reading of a sub-indicator (ravi) and plot it on the same sub-indicator for the rest of the day.
If you download the indicator a threshold is supplied but is manually adjusted. I wish to automate this.
The highest reading is to be taken from the indicator (ravi) during the period 16:30 to 02:00 , the threshold, a line / plot on the indicator, is then to be drawn / moved from yesterdays setting, to the new setting and remain there till a new setting the following day at 02:00 is calculated.
I have written this long hand as:
Plot Threshold = highest value of ravi from 16:30 to 02:00
I have taken out the variable threshold and replaced it with - 'private IntSeries T_holdsetting;'
then in the initialize - 'myIntSeries = new IntSeries(this);'
then in the Onbarupdate I have called the 'double threshold = .....' and have been trying to work out the formula for calculating the threshold from the IntSeries for the required period !!
Obviously unsuccessfully !!!
Am I trying to make this more complicated than it needs be?
Am I using the wrong command? Should it be a 'data series' how do i get it to just calculate from the required time to the required time (am trying to use 'ToTime' here but i am referencing a plot not a bar so the bar close value might not be the highest value).
Help required please. times are EST, not that that's to relevant !
Comment