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

Re: [amibroker] Looking for Ideas to document my Parameters



PureBytes Links

Trading Reference Links

No response?  I'll take that as a "don't go there."  I don't want to wander blind alleys if I don't know that there is a positive result down one of them.  

For now, I will take a different approach.  The idea may be of use to some others so I will explain my approach here.  

I will extend my Flexible Parameters so that a new FP_Help() command can be placed after each parameter function: 

FP_Param...(...);
FP_Help("Explain this param"); 

Normally, the program will default to no help and the parameter window will not look any different.
However, Shift-Clicking on any open top level menu section will toggle the help for that section.  This will cause an additional Help button to appear after each param that has a FP_Help() command after it.  Clicking on the "help" parameter will then pop up a window with an explanation for that parameter.

It took a very small amount of AFL to add this functionality and it is general enough that I can just substitute my FP_Help() function code when/if AFL gets an addition that lets me do it right (from a UI point of view) as per suggestions (which would be more useful to others).

For reference, here is my FP_Help code.  It relies on the variable FP_HelpMe to activate it.  For "normal" AFL (as opposed to Flexible Parameters system) you could have a paramTrigger() that toggles the help state in a static variable. Unfortunately, there is no way to force a recompile of the Parameters Window (to show the new help buttons) without resetting all parameters to default values (Reset all button), so a restart of the code would be required to get the new buttons to show up.  A dummy edit and apply of the code will force a clean restart without resetting parameters.  

Flexible Parameters has the Parameter Window recompile capability built in, but it is too involved to explain here.

//================================================================
// Inline parameter help documentation procedure
// Shift clicking on an open Flexible Parameter section menu will 
// toggle a feature to add a new button after every parameter
// for a help popup to explain the function of that parameter.
// The help state is saved in a static variable and defaults to off.
// We do have to generate a unique button name each time this is called
// 
FP_HelpName = 0;

procedure FP_Help(HelpText)
{
if(FP_HelpMe)
{
if(ParamTrigger("."+text50spaces+NumToStr(FP_HelpName++, 0.0,0),"???"))
{
PopupWindow(HelpText, "Parameter Help", 10, -1, -1);
}
}
}

Best regards,
Dennis


On Dec 11, 2008, at 1:56 PM, Dennis Brown wrote:

Tomasz,

I am happy with the DLL that restores the scroll position after automatically clicking the "Reset all" button in the Parameters Window.  I have made it available as a beta for all who have asked for it.  Your help and encouragement were very highly regarded.

I hate to bother you with a question here, but I would like to get this parameter documentation capability sooner rather than later (if at all).  I would be happy to try to do this with an addition to my DLL.  My only question for you (before I waste a lot of time researching this), is if you think it is possible (within reason) for a DLL to return the text of the "name" side of the Parameters Window that was last clicked, or moused over.  If you think it is possible, then perhaps you can give a very brief hint as to the general direction to pursue.  Of course I will share it with anyone who wants to use it.

Thank you for your consideration,
Dennis


On Dec 6, 2008, at 7:56 AM, Dennis Brown wrote:

Joseph,

There is a different help text for every different parameter.  Selecting which text to use is the problem.  How do I know which parameter the user wants help with?  Pointing to the parameter in the parameters window is the logical answer, but how does the AFL know which parameter is being pointed to?  The AFL enhancement suggestions below were made to solve this dilemma.

BR,
Dennis

On Dec 6, 2008, at 2:13 AM, J. Biran wrote:

Is there a way to use F1 to invoke this popup?
 
--

Joseph Biran
____________________________________________
From: amibroker@xxxxxxxxxxxxxxx [mailto:amibroker@xxxxxxxxxxxxxxx] On Behalf Of Dennis Brown
Sent: Friday, December 05, 2008 9:08 PM
To: amibroker@xxxxxxxxxxxxxxx
Subject: Re: [amibroker] Looking for Ideas to document my Parameters
 
Hello,
 
While waiting for a response on the two sugges tions below, I gave a shot at trying to implement the idea of having a ParamTrigger() popup some documentation for a whole section.  It is not hard to implement.  However, it is very cumbersome and does not convey the help for the parameter in question in the section.  It was simply unwork able in a practical UI sense.  I knew exactly what line of text to write if I could popup text for a specific parameter.  However, creating a large paragraph trying to reference each parameter by name followed by a description was a nightmare to write in a way that would make sense to a user.  I give up on that idea.
 
If a user clicks, hovers, etc., on a parameter name (as in the two suggestions) the context of that parameter is implied and needs no further reference in the help text.  To simulate this, I would have to have a ParamTrigger() parameter for help on each parameter taking up another line in between each parameter.  Definitely not a workable solution.
 
So, unless someone has another idea, it seems that I am at the mercy of Tomasz to add this capability to AB.
 
Best regards,
Dennis
 
On Dec 3, 2008, at 10:57 PM, Dennis Brown wrote:


The suggestions are #1638 and #1639 if you wish to add your votes.
 
BR,
Dennis
 
On Dec 2, 2008, at 11:25 AM, Dennis Brown wrote:


Dingo,
 
Thanks.  That is not a half bad idea.  I do have many expandable "sections" in my params hier! archy&nb sp;and even though it is not quite modular on the individual parameter level and takes up another line in each section, it would provide the essential functionality of embedding the documentation in the parameters.
 
Actually, I could save the extra parameter space, by making a shift-click on a Flexible Parameters section header bring up the help text for the section instead of closing or opening the section as an expansion to my FP base functionality.  And a right click would be even better, but it will not activate a ParamTrigger().  I could even modify the button text slightly to indicate that a help popup is available.  The documentation could then be rolled up into the parameter definitions in the AFL code.
 
So, there are several possible suggestions to make t his easy for all AFL programmers:
 
1.  Having a command that loads up some tooltip text for each parameter (just before the param statement).  AB would then display the text when hovering in the parameter window over the parameter name button.  Simple for the programmer to document the param.
 
2.  A Status("Parameter") could be executed after each param statement execution that would return three bits for the cursor is over the name button, or the name button was clicked or it was right clicked.  This could be very useful for even more things than just popup documentation.  I could definitely put the extra fun ctionality to good use in FP.  
 
3.  Alternatively, a ParamStatus("paramName") could be used anywhere in the AFL to return the same information as in 2.
 
4.  Activate and provide the status indicating a right click on a ParamTrigger()
 
I would prefer #2 or 3 first, but #1 is an independent suggestion that stands alone and could be used in conjunction with the other.  #4 is also independent ! but woul d work as a cruder way of doing more with the Params UI for documentation and other functionality.
 
Any other comments b efore I write up a suggestion?
 
Thanks,
Dennis
 
On Dec 2, 2008, at 9:04 AM, dingo wrote:


how about a "toggle" as the last entry in each section that says "Help on this param". Then show the help when it is clicked?
 
d
On Tue, Dec 2, 2008 at 8:36 AM, Dennis Brown <see3d@xxxxxxxxxxx> wrote:

Herman,
 
Thanks for the ideas.  
 more embedded below.
 
On Dec 2, 2008, at 5:38 AM, Herman wrote:


First: YES: I WOULD LOVE TO HAVE TOOLTIPS ADDED TO THE PARAM WINDOW. GREAT IDEA!
 
You should make a suggestion on the feed back site. Since Amibroker, when hovering the cursor over the Param window, already pre-selects the individual parameters (you can see this because they change appearance when you move you cursor over the items) the information you need is already available inside AB. It might be a simple task for TJ to make this available through a Status(). 
 
I noticed that the parameter name button changes appearance independent of the parameter button when the cursor is over it.  I thought that might be a clue for a way to differentiate a response.  If the name button could trigger a ParamTrigger() like response that could also be used for a popup.  Your suggestion of a Status() that indicated if the cursor is hovering over a parameter name or even if it was clicked could be a very.  Perhaps the status could be used in context so that it could follow an AFL parameter function and indicate if the cursor is currently over that parameter or the name was c! licked.< /div>
 
I will add a suggestion tomorrow (after any other suggestions come up).  I want to make sure I am suggesting something that is feasible so it does not just get rejected out of hand.


 
As is, except for when you are using a GFX based Params (Buttons) systems, I don't think it is possible. You could however embed P opUpWindow() or ToolTip() in your custom Param functions so that they popup when the param is c licked - however this would be after the fact ;-) Unless you educate your user to only 'confirm' a parameter setting by clicking on it but not changing the parameter. This would require a certain skill.
 
another way would be to have the Righ! t mouse button popup an information window that is relevant to the current, or last, selected Param. Or pop up a custom menu with relevant information options.
 
I know how to do this only for ParamTrigger() type parameters.  I can only detect user interactions for other types if the parameter is actually changed.


 
I think it would be very useful to have this function. There are many among us who prefer coding to trading and who write code that is used by others. I myself spend lots of time and write hundreds of emails explaining how things work. Having Param Tooltips would sa ve lots of time all around.
 
It also makes it much easier to embed the documentation into the code so that it remains up to date with code changes and is handy as a reference during program operation.  


 
Best regards,
herman
 
Monday, December 1, 2008, 9:55:36 PM, you wrote:
 
> Hello,
 
> I have hundreds of parameters in my system (using Flexible  
> Parameters).  My trading mentor wants to learn and start playing with
> my system in Jan (firs t time AB user).  I would like to be able to  
> have tooltip text pop up when he is over a parameter name in the  
> parameter window, or perhaps by left or right clicking on the  
> parameter name, have a commentary window or Gfx text box explaining  
> the parameter pop up in the chart.
 
> I don't have a clue of how to make this happen, or if someone has a  
> different brilliant idea of how I can embed my parameter d ocumentation
> into the AFL program so the user can easily reference it.
 
> Perhaps it is possible to trick the parameter name buttons to send  
> their name to somewhere that AFL could access somehow and pop up the  
> commentary.
 
> I wou ld appreciate any ideas.
 
< b>> Tomasz, If you can think of an AFL enhancement  that would make this  
> possible, I would love to suggest it.  I just don't know what  
> suggestion to make that would be practical.
 
> TIA,
> Dennis


 
 
 



__._,_.___

**** IMPORTANT ****
This group is for the discussion between users only.
This is *NOT* technical support channel.

*********************
TO GET TECHNICAL 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

*********************************




Your email settings: Individual Email|Traditional
Change settings via the Web (Yahoo! ID required)
Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured
Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe

__,_._,___