BullCharts Forum Homepage
Forum Home Forum Home > BullCharts > BullScript
  New Posts New Posts RSS Feed: Need Help Building An Indicator
  FAQ FAQ  Forum Search   Calendar   Register Register  Login Login

Need Help Building An Indicator

 Post Reply Post Reply
Author
Message Reverse Sort Order / View First Unread Post
kennerhk View Drop Down
Newbie
Newbie
Avatar

Joined: 29 Aug 2007
Location: Hong Kong
Posts: 8
Post Options Post Options   Quote kennerhk Quote  Post ReplyReply Direct Link To This Post Topic: Need Help Building An Indicator
    Posted: 17 Feb 2008 at 5:19pm

Black Dog, I tried your suggestion and it worked.  The indicator is up and running perfectly.  MUCH THANKS for your help!!!! 

Back to Top
blackdog View Drop Down
Regular
Regular
Avatar

Joined: 14 Nov 2006
Location: Vatican City State
Posts: 43
Post Options Post Options   Quote blackdog Quote  Post ReplyReply Direct Link To This Post Posted: 13 Feb 2008 at 8:23pm
kennerhk,
 
The error message refers to your input statement which should be in the format
INPUT(MESSAGE[,DEFAULT,MINIMUM,MAXIMUM]).
 
If you cut and paste your code into BS, perform 'check' then you get the error message that you found. However you also get the option for BS to correct the code. Select 'yes' and then hey presto your input line will change to
periods:=input("TMF periods", 21, 1, 100);
and your code will now work.
 
 
regards,
 
p.s. You also have to remove the space in "p eriods" in the last line.
BD
Back to Top
kennerhk View Drop Down
Newbie
Newbie
Avatar

Joined: 29 Aug 2007
Location: Hong Kong
Posts: 8
Post Options Post Options   Quote kennerhk Quote  Post ReplyReply Direct Link To This Post Posted: 13 Feb 2008 at 4:08am

I am trying to build an indicator in BC, but know ZERO about this, so I'm hoping someone can help me out.  This indicator is a variation on the Chaikin MoneyFlow with some exponential smoothing built in to correct some false signals.  The Metastock code provided by the indicator's author/creator on his website is as follows:

{2003-09-24}

periods:=Input("TMF periods",1,100,21);

TRH:=Max(Ref(C,-1),H);

TRL:=Min(Ref(C,-1),L);

TR:=TRH-TRL;

ADV:=((C-TRL)-(TRH-C))/If(TR=0,999999,TR)*V;

WV:=V+(Ref(V,-1)*0);

If(Wilders(WV,periods)=0,0,Wilders(ADV,periods)/Wilders(WV,p eriods))

I tried to just cut and paste this into the indicator builder window, but when I try to do that, I get the following error message:

"Error 902: parameter 3 to input function must not be greater than parameter 2"

Does anyone know how to tweak this to run in BC?  Ideally, I'd like the correct code so I can just cut and paste it into the Indicator Builder.  Would greatly appreciate your help on this. 

Thanks in advance!

 

 

Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down

Bulletin Board Software by Web Wiz Forums® version 9.69
Copyright ©2001-2010 Web Wiz