Need Help Building An Indicator |
Post Reply |
Author | |
kennerhk
Newbie Joined: 29 Aug 2007 Location: Hong Kong Posts: 8 |
Post Options
Quote Reply
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!!!! |
|
blackdog
Regular Joined: 14 Nov 2006 Location: Vatican City State Posts: 43 |
Post Options Quote Reply 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
|
|
kennerhk
Newbie Joined: 29 Aug 2007 Location: Hong Kong Posts: 8 |
Post Options Quote Reply 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!
|
|
Post Reply |
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |