[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [amibroker] Filter and Parameter



PureBytes Links

Trading Reference Links

Thanks for the replies Dennis

Don't use *if else* much, but I will look into this and see if I can get 
this to work.

Also appreciate your comments about capitalization of text.

ChrisB

Dennis Brown wrote:
> 
> 
> Chris,
> 
> Also watch the capitalization of the params and test text.
> I fixed my example below --you have "upbar" as a param and "Upbar" in
> the test.
> They are not the same for text matches.
> 
> Dennis
> 
> On Aug 7, 2007, at 12:30 PM, Dennis Brown wrote:
> 
>  > Chris,
>  >
>  > Us the IF(){} statement or Case statement instead of IIF() for this
>  > kind of program flow to make it simple to understand:
>  > (untested example)
>  > Typebar = paramlist("Typeofba rs", "Upbar, Downbar, AllBars",2);
>  > filter = Null;
>  > IF(Typebar == "Upbar") {filter = Upbar;}
>  > IF(Typebar == "Downbar") {filter = Downbar;}
>  > IF(Typebar == "AllBars") {filter = 1;}
>  >
>  > Dennis
>  >
>  > On Aug 7, 2007, at 12:07 PM, ChrisB wrote:
>  >
>  >> Hi
>  >>
>  >> I am still thinking about this:
>  >>
>  >> I want to use the Param function in Exploration to control one of
>  >> three
>  >> values I want to use for the Filter:
>  >>
>  >> Paramtoggle only gives me two values, to pass into the Filter:
>  >> true or
>  >> false, so I cannot use this.
>  >>
>  >> If I run
>  >> UPbar = C > O; Downbar = C < O;
>  >>
>  >> Filter =1; // in Exploration this works
>  >> Filter = UPbar; // In exploration this works
>  >> Filter = Downbar;// in exploration this works
>  >>
>  >> So I have looked at ParamList:
>  >>
>  >> This code does not do what I would have thought:
>  >>
>  >> Typebar = paramlist("Typeofba rs", "upbar, Downbar, AllBars",2);
>  >> TB = iif(Typebar == "Upbar", Upbar,
>  >> iif(Typebar == "downbar",Downbar,
>  >> iif(typebar == "AllBars, 1, Null)));
>  >> filter = tb;
>  >>
>  >> Exploration runs, but I get columns with heading with no data.
>  >>
>  >> Still not sure where to go from here.
>  >>
>  >> Any nudges in the right direction would be appreciated.
>  >>
>  >> thanks
>  >>
>  >> ChrisB
>  >>
>  >> ChrisB wrote:
>  >>>
>  >>>
>  >>> Hi group.
>  >>>
>  >>> Back to basics here.
>  >>>
>  >>> How can I use the Param function to modify my filters in
>  >>> Exploration?
>  >>>
>  >>> Currently I use
>  >>>
>  >>> Filter = 1;
>  >>> // Filter = UpBar = C > O;
>  >>> // Filter = DnBar = C < O;
>  >>>
>  >>> and just rem out the lines I don't need.
>  >>>
>  >>> How do I approach putting this into a
>  >>>
>  >>> Filter = param(" look at these bars", ....... ); ?
>  >>>
>  >>> This would be neater than accessing the code each time.
>  >>>
>  >>> Thx for any pointers.
>  >>>
>  >>> ChrisB
>  >>>
>  >>>
>  >>
> 
> 


Please note that this group is for discussion between users only.

To get support from AmiBroker please send an e-mail directly to 
SUPPORT {at} amibroker.com

For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/

For other support material please check also:
http://www.amibroker.com/support.html
 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/amibroker/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/amibroker/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:amibroker-digest@xxxxxxxxxxxxxxx 
    mailto:amibroker-fullfeatured@xxxxxxxxxxxxxxx

<*> To unsubscribe from this group, send an email to:
    amibroker-unsubscribe@xxxxxxxxxxxxxxx

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/