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

[amibroker] I need some more help with Flexible Parameters...



PureBytes Links

Trading Reference Links

Hello,

I have been working to make the Flexible Parameters system "relevant"  
to as many people as possible.  I am just finishing up version 4.0 and  
just have one beta tester for it.  However, I only use AmiBroker in  
indicator mode, so it was developed with that in mind.  Since the  
other AmiBroker modes do not factor into my trading platform, I have  
not taken the time to learn the details about them.

However, I was informed by my beta tester that the Flexible Parameters  
system could be useful to those who use the other AB modes.  I would  
welcome the participation of a tester/programmer who uses all the  
other AB modes and who could help me tweak the AFL so that it was  
applicable for those modes.

Please let me know if you are interested in helping to bring this free  
capability to all AmiBroker users.

Thank you,

Dennis


PS.  Since it was requested I post it, here is an overview of what I  
have in version 4.0:

Flexible Parameters is a replacement set for the AFL Param...()  
functions.

The purpose is to significantly increase the utility of the Parameters  
window.  This enhanced functionality makes it practical to develop  
different systems in a single chart and save out the settings for  
different modes or experiments.

List of New Capabilities:

*Save and Load multiple Parameter sets for a chart by name
*Auto select different Parameter sets for each timeframe mode
*Multi-level Hierarchical Parameter Menus
*Conditional Parameter Menus to only show relevant parameters
*Global parameters
*Chart set parameters
*Global per Symbol parameters
*The entire parameter structure can be shared or unique for each formula
*All parameters in running charts are in static variables that can be  
shared between different charts
*All parameters are saved as files that can be maintained with the  
file system tools

AmiBroker Minimum Version 5.16 beta is required for Flexible  
Parameters version 4.0.
Flexible Parameters has five files.  Three include files, one DLL  
file, and one Example AFL
FlexibleParams_F1.afl
FlexibleParams_F2.afl
FlexibleParams_F3.afl
FlexibleParamsDLL.dll
FlexibleParamsExample.afl

NEW FUNCTIONALITY DETAILS:
*Save and Load multiple Parameter sets for a chart by name

At any point, you can save out your current chart parameter settings.   
You choose the name.  Those settings are now a parameter set that you  
can load into your chart at any time from a pull down list of the  
saved sets.

*Auto select different Parameter sets for each timeframe mode

Each different timeframe mode has its own parameter sets.  For  
instance, time mode charts will have a different parameter set from  
volume bar mode charts.
Three modes have been implemented so far: Time bar, Volume bar, and  
Range bar.  Tick bars have not yet been implemented, but it would be  
easy to add it.  It would also be easy to add different modes for  
intraday vs daily or weekly timeframes.
The parameters are switched automatically when the new timeframe mode  
is selected.  However, you can also save out a set named "DailyBars"  
or "WeeklyBars" and then select these from a pulldown list when you  
change modes.

*Top Level Menu for Flexible Parameters

Every chart that includes the Flexible Parameters files has a top  
level menu for maintenance of the Parameters.  It provides the basic  
functions needed in every chart:

Selection of all available parameter sets for this chart from a pull  
down list
Save the current parameters as a new set
Reset all parameters in the current set to defaults
Reset parameters to defaults only for the open menus
Collapse all top level menus
Debug Mode:
	Shows section names on the left of the section menu name.
	Audio feedback of internal operations like saying "update" whenever  
the Parameter Window is recompiled.
	User added debug code with the FP_Debug variable. Example:
	if(FP_Debug){Say("Made it Here");}

Organization of parameter file sets:

All parameters are shared globally with all formulas/charts that use  
the same top level path. There are 3 folders at the second level:

The Globals folder contains global parameters that are specified by  
using parameter names of the form: GP_ParamName.
The Symbols folder contains a third level of folders, one for each  
symbol name.  Parameters that use the form: SP_ParamName will  
automatically be saved in the folder of the currently selected symbol  
name.
The ChartSets folder also contains a third level of folders, one for  
each chart parameter set that has been created or "Saved as".  A chart  
parameter set folder name has the form:  SetName_TimeframeMode.  The  
currently defined TimeframeMode designators are "_tim", "_vol", and  
"_rng".
Parameters are saved as text files (one per parameter).   Here is the  
file hierarchy:

FP_Params
	Globals
		Individual Parameter files
	Symbols
		SymbolTicker
			Individual Parameter files for symbol
	ChartSets
		ParameterSetName
			Individual Parameter files for set

List of FP Functions:

FP_Section_Begin("Name") --4 chars max
FP_MenuSection("MenuLabel")
FP_Menu("SubMenuName","SubMenuLabel")
FP_MenuToggle("ParamName", "MenuLabel", ”Choices”, default)
FP_MenuList("ParamName", "MenuLabel", ”Choices”, “default”)
FP_IsResetDef() --use with multiple submenu selections

FP_ParamTrigger("LabelText", ”ButtonText”)
FP_ParamToggle("ParamName", "LabelText", ”falseText|trueText”,  
defaultState)
FP_Param("ParamName", "LabelText", defaultValue, Min, Max, Step)
FP_ParamStr("ParamName", "LabelText", “defaultText”)
FP_ParamList("ParamName", "LabelText", ”item1|item2| 
item3...”,“defaultText”)
FP_ParamColor("ParamName", "LabelText", defaultColor)
FP_ParamStyle("ParamName", "LabelText", defaultStyle, styleMask)

FP_ParamTime("ParamName", "LabelText", “defaultTimeText”)
   myTimeNum =  
DateTimeConvert(1,StrToDateTime(FP_GetParamStr("ParamName")));

FP_ParamDate("ParamName", "LabelText", “defaultDateText”)
   myDateNum =  
DateTimeConvert(0,StrToDateTime(FP_GetParamStr("ParamName")));

ParamField() not implemented directly, substitute these:
   FP_ParamList("PriceType", ".  Price Source", "O|H|L|C|Avg", "C");
   myPriceArray = getPrice(FP_GetParamStr("PriceType"));
   getPrice() is a function defined in the FlexibleParamsExample.afl

FP_GetParam("ParamName")  --for numeric parameters
FP_GetParamStr("ParamName")  --for string/text parameters

FP_InitParam("ParamName", default) --advanced use
FP_InitParamStr("ParamName", "default") --advanced use
FP_SyncParam("ParamName", newValue) --advanced use
FP_SyncParamStr("ParamName", "newText") --advanced use
FP_ParamsChanged() --get and clear flag
FP_RefreshParams() --click Reset all button (recompile Params Window)
FP_RefreshParamsDelayed(delay) --advanced use

FP INCLUDE Variables:

FP_FirstFlag --first AFL pass
FP_CloseAll --advanced use
FP_ChartID --string of GetChartID()
FP_ChartMode --"_tim", "_vol", "_rng"
FP_Symbol --current chart symbol derived from name()
FP_ParamPathTop --path to the top level parameters folder
FP_Debug --Special operating mode to provide additional feedback

FP DLL Functions:

FP_GetModifierKeys() --ShiftKey=1; AltKey=2; ControlKey=4; 
------------------------------------

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/