Set/Reset (SetRst)

This function is available on the Add Study window and in the Formula Toolbox.

Set/Reset creates a picture of binary data for you, using two conditions. The first condition is displayed as an uptick on a line graph. The line continues on that level until the second condition is satisfied. Then the line returns to its baseline until the first condition occurs again. On a bar graph, the bars change colors to reflect the set and reset conditions.

For example:

mval := MACD(@,13,26);

diff := mval - MACDA(@,13,26,9);

SetReset(mval XABOVE 0, diff < diff[-1])

In this example on a bar graph, this formula would color bars when MACD crossed above zero and would stop marking the bars when the difference between the MACD and the MACDA turned down.

Example: SetRst(Hour(@)=9,Hour(@)=12)

 

Parameter

Description

Display

Opens a sub-window with display properties:

      Color = Select a line color.

      Weight = Type a value for line thickness.

      Display = Select line style: line, histogram, or dash.

      ShareScale = Assign a behavior for functions and studies sharing the vertical scale:

      Auto = System determine whether sharing is feasible.

      On = Scale is shared regardless of the functions and studies displayed.

      Off = Scale is not shared.

MarkIt

Opens the Specify Conditions for Marking Bar window.

Condition 1

Formula that defines the condition to return a positive response.

Condition 2

Formula that defines the condition to end the response started by the first condition.

Use Edges

SetRst(Hour(@)=9,Hour(@)=12) with Use Edges does not trip to 1 on a 5-min bar chart until the first bar on which it turns is complete the 9:00 bar.

It actually returns 1 or true on the bar immediately following the first condition 9:05, hence the term “use edges.”

Rather than show true at start of the start condition bar, it waits until the starting condition - start bar is completed.

Without Use Edges, it immediately turns to true when the start condition (Hour(@)=9) bar is first formed.