BSTrend
Posted: Sat Dec 01, 2018 9:09 am
Based on post.
https://www.prorealcode.com/prorealtime ... s/bstrend/
BSTrend.lua based strategy.
viewtopic.php?f=31&t=67041
Your last stop on a way to find a fast growing community of forex traders and software developers. Best forex charts indicators are available here for download. Custom development of indicators and translation to .LUA is also available on request.
http://fxcodebase.com/code/
function Prepare(name)
...
BST_Stream = instance:addStream("BST_Stream" , core.Bar, " BST_Stream"," BST_Stream",Neutral, first);
...
function Update(period)
..
if ((ld8 < 0.0 and ld0 > 0.0) or ld8 < 0.0) then
Oscillator:setColor(period,Down);
BST_Stream = -1;
elseif ((ld8 > 0.0 and ld0 < 0.0) or ld8 > 0.0) then
Oscillator:setColor(period, Up);
BST_Stream = 1;
else
Oscillator:setColor(period,Neutral);
BST_Stream = 0;
end
..
end
function Update(period)
if BST.BST_Stream[period] == 1
then
BUY();
elseif BST.BST_Stream[period] == -1
then
SELL();
else
T1_BST_Trend = "";
end
end