Hi,
Am attempting to build a strategy in LUA using the Open/Close/High/Low of the last 3 candles on my chart.
Could someone please provide some sample code/links on how to do this
Moderator: admin
function Prepare( nameOnly)
Source = ExtSubscribe(2, nil, TF, instance.parameters.Type == "Bid", "bar");
end
function ExtUpdate(id, source, period) -- The method called every time when a new bid or ask price appears.
if id~= 2 then
return;
end
if period < Source:first() + Period
then
return;
end
local CandleOpenPeriodPeriodsAgo=Candle.open[period-Period+1];
end
Return to Indicator Development
Users browsing this forum: No registered users and 17 guests