is there in LUA Code for this was originally in thinkscript code
http://www.thinkscripter.com/forum/view ... 7355#p7355
Moderator: admin
DEF V1 = (((LOW < LOW[-1]) * (LOW < LOW[1])));
DEF V2 = ((HIGH > HIGH[-1]) * (HIGH[-1] > HIGH[-2]));
DEF V3 = (((HIGH > HIGH[-1]) * (HIGH > HIGH[1])));
DEF V4 = ((LOW < LOW[-1]) * (LOW[-1] < LOW[-2]));
rec bot;
bot = if
((V1 > 0.5))
then Low else bot[1];
plot data = BOT;
rec bot2;
bot2 = if
((V2[2] > 0.5)*(v1 > 0.5))
then high[2] else bot2[1];
plot v6 = if bot2 > bot then bot2 + (bot2 - bot) else double.NaN;
plot data2 = BOT2;
rec bot3;
bot3 = if
((V3 > 0.5))
then high else bot3[1];
plot data3 = BOT3;
rec bot4;
bot4 = if
((V4[2] > 0.5)*(v3 > 0.5))
then low[2] else bot4[1];
plot data4 = BOT4;
plot v7 = if bot4 < bot3 then bot4 - (bot3 - bot4) else double.NaN;
data.assignValueColor(color.DARK_RED);
data.setPaintingStrategy(paintingStrategy.POINTS);
data2.assignValueColor(color.blue);
data2.setPaintingStrategy(paintingStrategy.dashes);
data3.assignValueColor(color.DARK_green);
data3.setPaintingStrategy(paintingStrategy.POINTS);
data4.assignValueColor(color.magenta);
data4.setPaintingStrategy(paintingStrategy.dashes);
Apprentice wrote:Requested can be found here.
viewtopic.php?f=17&t=61780
Return to Indicator and Signal Requests
Users browsing this forum: No registered users and 31 guests