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

[amibroker] Re: Is it possible to force parameter changes programatically?



PureBytes Links

Trading Reference Links

MurthySuresh,
Thanks for your idea but...I used the following code (I'm not a programmer but think it is correct). The printf statements indicate the cases are switching properly but the parameter settings still do not change when I change the chart being viewed until I force a "reset all" from the parameters window. Any ideas on how to force this reset?
*************************
switch (Name())
{ 
    case "AHTFX": 
      TrailB = Param( "Entry %", 2, 1, 20, 1 )/100;
	TrailS = Param( "Exit %", 2, 1, 20, 1 )/100;
	printf("Parameter changed to 2\n"); 
      break; 
    case "PTTDX": 
	 TrailB = Param( "Entry %", 3, 1, 20, 1 )/100;
	TrailS = Param( "Exit %", 3, 1, 20, 1 )/100;
	printf("Parameter changed to 3\n"); 
	break;
    default: 
     TrailB = Param( "Entry %", 6, 1, 20, 1 )/100;
	TrailS = Param( "Exit %", 6, 1, 20, 1 )/100;
 	printf("Parameter changed to Default 6\n"); 
    break; 
}
***********************************





--- In amibroker@xxxxxxxxxxxxxxx, "murthysuresh" <money@xxx> wrote:
>
> you cannot use the param in conditional statements. like
> ParamStr etc
> what i meant was that you can store the param values in a variable  param1, param2....
> and use the switch statements to chagne the param values in that variable.
> 
> 
> 
> 
> --- In amibroker@xxxxxxxxxxxxxxx, "japple_55" <aimria@> wrote:
> >
> > Did that already but the parameters do not actually change when I change the symbol in the chart. The Reset button in the parameters window has to be used to force the change.
> > 
> > 
> > 
> > --- In amibroker@xxxxxxxxxxxxxxx, "murthysuresh" <money@> wrote:
> > >
> > > i dont think so. why dont you just use conditional statements.
> > > with if(name()=="blah")
> > > {
> > > param1=something
> > > }
> > > 
> > > or you can use a switch case.
> > > 
> > > --- In amibroker@xxxxxxxxxxxxxxx, "japple_55" <aimria@> wrote:
> > > >
> > > > I have a single system plotted on a chart that I would like to view/test for several symbols, where only the parameters will change according to the symbol being viewed/tested.
> > > > 
> > > > I've got the parameter changes coded as symbol dependent ("IIF name = ...") and their values reflect properly in the title when I change symbols. But, the system calculations don't update with the new parameters unless I manually reset from the parameters window.  Is there a way to force this reset programatically within the AFL code so the changes happen automatically when I change symbols?
> > > > Thanks,
> > > > Jim
> > > >
> > >
> >
>




------------------------------------

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

TO GET TECHNICAL SUPPORT send an e-mail directly to 
SUPPORT {at} amibroker.com

TO SUBMIT SUGGESTIONS please use FEEDBACK CENTER at
http://www.amibroker.com/feedback/
(submissions sent via other channels won't be considered)

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

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/