how to write code for classic pivots
high low and close are of previous days
pivot = (high + low + close) / 3.0;
pivotPoint.p = pivot;
pivotPoint.r1 = pivot * 2 - low;
pivotPoint.s1 = pivot * 2 - high;
pivotPoint.r2 = pivot + (high - low);
pivotPoint.s2 = pivot - (high - low);
pivotPoint.r3 = pivot * 2 + (high - 2 * low);
pivotPoint.s3 = pivot * 2 - (2 * high - low);
pivotPoint.r4 = pivot * 3 + (high - 3 * low);
pivotPoint.s4 = pivot * 3 - (3 * high - low);
pivotPoint.r5 = pivot * 4 + (high - 4 * low);
pivotPoint.s5 = pivot * 4 - (4 * high - low);
Pivot Points Can not be plotted from Tradescript.
Are you looking above AFL in Tradescript?
Can we create a scanner for pivot point/resistance/support break out to know which stocks are trading above or breaching the lines
i want to use this pivot point indicater for mt4 is it possible
I think this type of code will work for pivot breakout but its not working in backtesting, can any one suggest the changes.
aim is to get an alert when LTP is crossing pivot point. so if its going up through pivot line then buy signal and if going down through pivot line then sell signal.
SET PVT = (( REF(HIGH,1) + REF(LOW,1) +REF(CLOSE,1) ) / 3.0)
LAST > PVT
This is working but needs some correction. I will update.