Hi I am waiting for a indicator chart info to get fixed and Apprentice mentioned it was TS problem? I have been waiting for almost a 6 months for a fix? Please read blog for details...
viewtopic.php?f=17&t=61866
Moderator: admin
Julia CJ wrote:Hi Mechanicjon,
This issue regarding Zoom will be fixed in the nearest time and its correction will be included in the upcoming release of Trading Station.
scandisk wrote:Hi I am waiting for a indicator chart info to get fixed and Apprentice mentioned it was TS problem? I have been waiting for almost a 6 months for a fix? Please read blog for details...
viewtopic.php?f=17&t=61866
mechanicjon wrote:Julia CJ wrote:Hi Mechanicjon,
This issue regarding Zoom will be fixed in the nearest time and its correction will be included in the upcoming release of Trading Station.
Any idea when that will be???
function Init()
indicator:name("Show Yesterday Close")
indicator:description("The indicator shows yesterday's close value on the chart")
indicator:requiredSource(core.Tick)
indicator:type(core.Indicator)
indicator.parameters:addColor("clr", "Indicator Line Color", "", core.rgb(255, 0, 255))
end
local source -- indicator source data
local first -- first available source data
local loading -- the loading day data flag
local TFsource
local offset
local weekoffset
local output
local window = 3
local val
local newCycle
function Prepare()
local name
name = profile:id() .. "(" .. instance.source:name() .. ")"
instance:name(name)
source = instance.source
first = source:first()
loading = false
local host = core.host
output = instance:addStream("output", core.Line, name, "output", instance.parameters.clr, first)
TFsource = host:execute("getSyncHistory", source:instrument(), "H1", source:isBid(), 0, 100, 101)
end
function Update(period, mode)
if period < first then
return
end
if loading then
return
end
newCycle = barCycleBegin(isNewBar(TFsource), window)
--trace("update --> newCycle: " .. tostring(newCycle))
if newCycle then
val = getHighestClose(TFsource, window)
end
--trace("update --> val: " .. tostring(val))
output[period] = val
end
function AsyncOperationFinished(cookie, success, error)
if cookie == 101 then
loading = true
elseif cookie == 100 then
assert(success, error)
loading = false
instance:updateFrom(0)
end
end
function getHighestClose(stream, rangeSize)
local size = stream:size() - 1
local min, max
min, max = mathex.minmax(stream.close, size - rangeSize + 1, size)
return max
end
do
local previous
function isNewBar(stream)
local bang = false
local current
current = stream:size() - 1
previous = previous or 0
if current > previous then
previous = current
bang = true
end
return bang
end
end
do
local counter
function barCycleBegin(trigger, cycle)
local bang
if counter == nil then bang = false end
counter = counter or 0
if trigger then counter = counter + 1 end
if counter == cycle + 1 then
counter = 1
bang = true
else
bang = false
end
return bang
end
end
function trace(string)
core.host:trace(string)
end
Georgiy wrote:mechanicjon wrote:Julia CJ wrote:Hi Mechanicjon,
This issue regarding Zoom will be fixed in the nearest time and its correction will be included in the upcoming release of Trading Station.
Any idea when that will be???
The current TS production version includes the fix regarding Zoom.
Georgiy wrote:scandisk wrote:Hi I am waiting for a indicator chart info to get fixed and Apprentice mentioned it was TS problem? I have been waiting for almost a 6 months for a fix? Please read blog for details...
viewtopic.php?f=17&t=61866
Scandisk,
The bugs were fixed and changes were released in the current version of TS.
As we can see, the problem is in the indicator itself. It gets the error message after relogin.
Please find the fixed version of indicator in the attachment.
scandisk wrote:
There is still a problem when loging in this indicator has to be restarted??
Georgiy wrote:Please find the fixed version of indicator in the attachment.
Users browsing this forum: No registered users and 5 guests