error in systems?

Questions about MultiCharts and user contributed studies.
florianp3
Posts: 20
Joined: 10 Jun 2014
Has thanked: 4 times

error in systems?

Postby florianp3 » 09 Dec 2020

Hello,
I wrote a simple volatility system on range bars that buys and sells symmetrically at a fixed distance from the open next bar.
From the screenshots you can see it sells correctly 2 points from the open next bar but buys 3 !?! points from the open next bar.

Inputs: RB(2),Len(3);
vars: onb(c);
onb=open next bar;
If onb >= highest(o, len) then sellshort next bar at onb - RB points stop;
if onb <=lowest(o,len) then buy next bar at onb + RB points stop;

Is this a bug?

Please let me know what is the matter
Florian
Attachments
2020-12-09 (1).png
(195.36 KiB) Not downloaded yet
2020-12-09 (2).png
(194.73 KiB) Not downloaded yet
2020-12-09.png
(195.29 KiB) Not downloaded yet

User avatar
syswizard
Posts: 295
Joined: 15 Dec 2012
Has thanked: 16 times
Been thanked: 28 times

Re: error in systems?

Postby syswizard » 09 Dec 2020

What happens when you try this ? :
[intrabarordergeneration = true];
If Open >= highest(o, len)[1] then sellshort this bar at Open - RB points stop;
if Open <=lowest(o,len)[1] then buy this bar at Open + RB points stop;

User avatar
TJ
Posts: 7740
Joined: 29 Aug 2006
Location: Global Citizen
Has thanked: 1033 times
Been thanked: 2221 times

Re: error in systems?

Postby TJ » 10 Dec 2020

See post #1 & post #2
viewtopic.php?t=11713


Return to “MultiCharts”