Scripts Supporting Mouse Click to Set Price
Scripts can be set up to support the setting of price or date by a mouse click using the Points() function.
In this example 3 plots would be created, the first would be at the selected price, the second would be 1 ATR lower and the third would be 2 ATRs lower.
plot1 = v;
plot2 = v - LAST(ATR());
plot3 = v - LAST(ATR())*2;
The formula should be saved as a script tool set to the Same View, so it can then be selected from your tool box:
The Points function allows the selection of up to 3 different price points (clicks) when applying the tool.
Example with two points:
**V1 = POINTS().Point1.Pice;
V2 = POINTS().Point2.Price;
Plot1 = (V1 + V2) / 2**
This script would show the mid point between two selected prices.
The Points function additionally supports the selection of a Date / Time, for scripted tools you want to calculate from a specific date on the chart.
plot1 = If(BARDATE() > v, highesthigh(), 0);
Show the Highest high (over the last 8 days) only after the selected date, otherwise show a zero value.