Multicharts - Problem with study

If you don't know where to start, start here! Don't be afraid to ask questions.

Moderator: moderators

rank: <50 posts
rank: <50 posts
Posts: 5
Joined: Thu Dec 04, 2008 11:42 pm
Reputation: 0
Gender: None specified

Multicharts - Problem with study

Postby ptcman » Tue Dec 09, 2008 8:10 pm


Can anyone plot this formula on an intraday chart in multicharts?

I've been trying to plot it but I'm always receiving a floating point error or a floating point division by zero error. It seems that he detect 2 different error each time I try to plot it. :?

I'm able to open it on a daily chart but there's something wrong because it plots negative values for some bars when that shouldn't be possible.

The weird thing though is the fact that, apparently, in tradestation that error don't occur in intraday charts :?

I would appreciate some thoughts from you.
Thank you

Code: Select all

{ *Variables*}
vars : cls(0), dRng(0);
vars : inRng(true), upRng(true), dnRng(true), inBulRng(0), pctBul(0);
vars : in1Bul(0), in2Bul(0), up1Bul(0), up2Bul(0), dn1Bul(0), dn2Bul(0),bulRng(0);

{ *Variable declaration* }
cls = close[1];
inRng = high > cls and low < cls;
upRng = low >= cls;
dnRng = high <= cls;

{ *Daily Range* }
if dnRng then begin
dRng = cls - low;
if upRng then begin
dRng = high - cls;
if inRng then begin
dRng = high - low;

{ *Inside Range 1st version* }
if inRng then begin
in1Bul = high - open;
in2Bul = close - low;
bulRng = (in1Bul + in2Bul) * 0.5;

{ *Percentage Range }
pctBul = (1-bulRng/dRng)*100;

{ *Plot in own Window* }

{ *Plot in own window upRng, dnRng and inRng conditions*
plot3(high>cls and low<cls); }

Please add to your ad blocker white list.
Thank you for your support.

Return to “beginners forum”