## Multicharts - Problem with study

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

Moderator: moderators

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

### Multicharts - Problem with study

Hi.

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 begindRng = cls - low;endelseif upRng then begindRng = high - cls;endelseif inRng then begindRng = high - low;end;{ *Inside Range 1st version* }if inRng then beginin1Bul = high - open;in2Bul = close - low;bulRng = (in1Bul + in2Bul) * 0.5;end;{ *Percentage Range }pctBul = (1-bulRng/dRng)*100;{ *Plot in own Window* }plot1(pctBul);{ *Plot in own window upRng, dnRng and inRng conditions* plot1(high<=cls);plot2(low>=cls);plot3(high>cls and low<cls); }`