PureBytes Links
Trading Reference Links
|
"selina" <selina2@xxxxxxxxxxxx> asks:
>I'd like to know how to express yesterday's pivot, support, resistance line
>in one minute data.
>It should make a line per one day.
The basic strategy is to detect the start of a new day, usually by
testing if date <> date[1], and then look back at the prior days'
data to gather the highs, lows, closes, etc., that make up the
formulae you want to plot. Then you simply plot the results of
the formulae, which should remain unchanged until the next date
change.
If you want to just show your indicators on the last day of a chart,
wrap your code (other than "if currentbar = 1" initializations) in
a test: "if date = LastCalcDate then begin..." If you leave your charts
running throughout the week, you can reset them to just show the
last day's plots by turning an indicator's status off then back on,
after the first bar of the new day has completed.
Jim
|