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

[amibroker] FirstParamAttempt



PureBytes Links

Trading Reference Links

This is my first attempt to use Param.  

I made a custom version of the builtin ADX indicator. 

I left the built-in range set at 14, but I changed it from "range" to "range14". 

range14 = Param("Periods", 14, 2, 200, 1 );

 

I then made a second set of three ADX plot statements and designated the range to be  

range5 = Param("Periods", 5, 2, 200, 1 );

I then made the other apparently needed changes from 14 to 5 in the three plot lines, but it will not plot the three additional plots with the range of 5. 

I also played with  ParamStr( ''name'', ''default'' ) in an attempt to change the period  that shows "5", but that caused an error.

When I plot the 5 version alone, it does have the darker colors that I specified.   Also the name was "ADX(14)", and it is now "Unnamed 15(14)" and the values displayed are still equal to those of the 14 period.

 

range5 = Param("Periods", 5, 2, 200, 1 );

Plot( ad = ADX(range5), _DEFAULT_NAME(), ParamColor( "ADX color", colorBlue ), ParamStyle("ADX style", styleThick ) );

Plot( pd = PDI(range5), "+DI", ParamColor( "+DI color", colorGreen ), ParamStyle("+DI style") );

Plot( md = MDI(range5), "-DI", ParamColor( "-DI color", colorRed ), ParamStyle("-DI style") );

I would appreciate some help to learn the correct way to do this.  meanwhile, I will revert to using the ADX(), MDI() and PDI() functions till I learn how to use param.  Ron D

 

 

 

 

range14 = Param("Periods", 14, 2, 200, 1 );

Plot( ad = ADX(range14), _DEFAULT_NAME(), ParamColor( "ADX color", colorDarkBlue ), ParamStyle("ADX style", styleThick ) );

Plot( pd = PDI(range14), "+DI", ParamColor( "+DI color", colorDarkGreen ), ParamStyle("+DI style") );

Plot( md = MDI(range14), "-DI", ParamColor( "-DI color", colorDarkRed ), ParamStyle("-DI style") );

 

 

range5 = Param("Periods", 5, 2, 200, 1 );

Plot( ad = ADX(range5), _DEFAULT_NAME(), ParamColor( "ADX color", colorBlue ), ParamStyle("ADX style", styleThick ) );

Plot( pd = PDI(range5), "+DI", ParamColor( "+DI color", colorGreen ), ParamStyle("+DI style") );

Plot( md = MDI(range5), "-DI", ParamColor( "-DI color", colorRed ), ParamStyle("-DI style") );



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 other support material please check also:
http://www.amibroker.com/support.html





Yahoo! Groups Links