Hiya,
Need some help here.
Can you please indicate where to correctly place this code below in the indicator pivot.lua so as I can get and use the correct data (periods) to use on calculations. so that it will be displayed/stream correctly in current periods with the Pivot Point in the pivot.lua indicator.
I have finished my indicator and it works perfectly barring the incorrect pivots from Gideons indicator. So I am converting mine into the pivot.lua for use of correct pivots.
BTW... mine is an oscillator so I stripped out unneeded parmeters in pivot.lua and changed output streams to internal streams....to convert to oscillator it works so far.
Indicator calculation routine
function Update(period)
if period >= first and source:hasData(period) then
High = source.high[period]; -- gets the high of the period/bar
low = source.low[period]; -- gets the low of the period/bar
open = source.open[period]; -- gets the open of the period/bar
close = source.close[period]; -- gets the close of the period/bar
local dif = close - open;
local difHL = high - low;
if difHL > pips then
if dif >= 0 then
destStream[period] = 1;
else
destStream[period] = -1;
end
else
destStream[period] = 0;
end
end
end -- ends function update .......where would this end be placed in the pivot indicator ????
Can you help me out in where to actually place/position it as everywhere I have tried doesn't work?
Cheers
LordTwig