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
error in systems?
error in systems?
- 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
Re: error in systems?
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;
[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;
- TJ
- Posts: 7740
- Joined: 29 Aug 2006
- Location: Global Citizen
- Has thanked: 1033 times
- Been thanked: 2221 times