Moderator: admin
Hug Coder wrote:bid = core.host:execute("getBidPrice");
ask = core.host:execute("getAskPrice");
gives error "Not Supported".
sunshine wrote:Hug Coder wrote:bid = core.host:execute("getBidPrice");
ask = core.host:execute("getAskPrice");
gives error "Not Supported".
The methods can be used in indicators only. In strategies you can use prices from subscribed streams.
sunshine wrote:I have forwarded the issue to developers. Hope it will be fixed in the next release.
Thank you for reporting the problem.
sunshine wrote:The strategy code can be rewritten so that the strategy will check the conditions on a live bar. But this will cause the strategy to produce false signals.
Please read for details the article: Closed Bar against Live Bar.
ExtSubscribe(2, nil, "t1", true, "tick");
barPeriod = barSource:size() - 1;
if barSource:serial(barPeriods) == lastSerial then
return;
end
lastSerial = barSource:serial(barPeriods)
Users browsing this forum: No registered users and 8 guests