Inside Bar Express indicator

Post Reply
Tibovwh
Posts: 24
Joined: 27 Aug 2015 22:36

Inside Bar Express indicator

Post by Tibovwh »

HI,

I was trying to open the Inside Bar indicator in express but it appears to be encrypted. Is there any chance I could have the code for this indicator?

Best,
User avatar
WHS Support
Posts: 2430
Joined: 14 Feb 2013 10:27

Re: Inside Bar Express indicator

Post by WHS Support »

Hello Tibovwh,

as there is a copyright on this code we can unfortunately not provide the unencrypted version of this indicator.

Kind regards,
Timo
WH SELFINVEST
Tibovwh
Posts: 24
Joined: 27 Aug 2015 22:36

Re: Inside Bar Express indicator

Post by Tibovwh »

Thanks for your answer!

I've put together this rather simple code. It seems to work, but the only thing that's bugging me is that the current candle shows an IB before the completion of the candle. Any idea how I could fix this? It feels like this should be easy to do but can't find it.

Code: Select all

Express InsideBar
Vars

Input 
$Show_InsideBar(0, 1, 1);

Calculation
if IsFirstBar() then
CalculateAtEveryTick(false);


if (high[0] < high[1]) and (low[0] > low[1]) then
begin
  if isBarCompleted() then
begin
  if $Show_InsideBar = 1 then HighlightRGBat(0, "slot", 255,255, 255);
end
end

Interpretation
begin
end

Best,
User avatar
WHS Support
Posts: 2430
Joined: 14 Feb 2013 10:27

Re: Inside Bar Express indicator

Post by WHS Support »

Hi Tibovwh,

for me the code looks fine. The highlight only occurs after the candle is completed (because you have put "IsBarCompleted()" function).

Code: Select all

Express InsideBar
Vars

Input 
$Show_InsideBar(0, 1, 1);

Calculation
if IsFirstBar() then
CalculateAtEveryTick(false);

if (high[0] < high[1]) and (low[0] > low[1]) and IsBarCompleted() then
begin
  if $Show_InsideBar = 1 then HighlightRGBat(0, "slot", 255,255, 255);
end

Interpretation
begin
end
Kind regards,
Timo
WH SELFINVEST
Tibovwh
Posts: 24
Joined: 27 Aug 2015 22:36

Re: Inside Bar Express indicator

Post by Tibovwh »

Indeed, it seems to work fine for intraday charts!

Thanks for the help,

Best,
Tibovwh
Posts: 24
Joined: 27 Aug 2015 22:36

Re: Inside Bar Express indicator

Post by Tibovwh »

Hi,

I have been trying to replicate the way the InsideBar indicator draws the High and Low of the Mother Bar of the Inside Bar. So far, I haven't really found a way to do it. See below:


I've come up with the following code:

Code: Select all

Express TMS_MC

Vars

numeric x, y, mc, hi, lo;
series r, upper, lower;

Calculation

CalculateAtEveryTick(false);

x = h;
y = l;
r = (x-y);

if (h[1] > h) and (l[1] < l) then
  mc = 1;
if (c > upper[1]) or (c < lower[1]) then
  mc = 0;

if mc = 1 then
begin
  hi = high[1];
  lo = low[1];
end
else
begin
  hi = void;
  lo = void;
end

upper = hi;
lower = lo;


Interpretation
begin
end

plot(upper, blue, 1);
plot(lower, blue, 1);
Schermafdruk 2015-09-07 01.43.56.png
Couple of problems:

it starts drawing one candle late.
It doesn't fix the high and low to the high and low of the mother bar but rather changes to previous bar high/low.
I would like the high/low lines to show until the price has closed outside this range.

would anyone be kind enough to help me out with this?
You do not have the required permissions to view the files attached to this post.
Post Reply

Return to “WHS NANOTRADER - EXPRESS PROGRAMMING”