![]() |
How to Plot a Marker During the
First xx Min and Test when one Study is Above Another Study |
A DYOS tip from the Developer: When calling out a value in a DYOS that will be used immediately by the next line (and not elsewhere), a fresh GV does not need to be assigned and, instead, the default GV of 0 can be used as "the local junk GV).The following DYOS does two things: (a) Plot a marker during the first 120m (Lines A-E) and (b) test when one Study is Above another study (Lines G-I). ![]() A. This DYOS selects a specific time period, in this case, the first 120m of trading, and places a marker on the chart Top Row #4 when a study on the chart is either rising or falling. Line A selects the study time period. In this case it is 120m after the first open. This can be changed as needed. It writes a GV for later use. Line B calls out the Study Flag we want to show during that time period and writes its value (True or False) as GV 2. Line C is logic that says if Line A (in the 1st 120m) "AND" Line B (Study Rising) are both true, Plot a Green Chevron at the top of the chart for only those bars when the study is rising. Note: A "2" is used to indicate that the AND includes "2" values: the "Read GV" value (first 120m) and the "next" GV (Study Flag). Line D is the logic that calls out when the Line B flag is False, ie, the Study is Falling. Line E plots a Red Chevron at the top of the Chart for those bars when the study is falling. Line F simply separates these two different alerts. B. These lines, which flag when Study A is Above Study B, can be used in their own stand-alone DYOS, but are shown here for convenience. Line G selects the first Study and assigns GV1. Note that GVs can be reused within a DYOS (only if they are not passed to another alert, study, or DYOS outside of this one). Line H selects the second Study and assigns GV2. Line I tests if the value from Study 1 is greater than (ie, above) Study 2, and, in this example, plots a Zone background. |