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

Re: [amibroker] HighestValueThatDay



PureBytes Links

Trading Reference Links

Well, you need to compare all the arrays to pick the max value for each day.
This would be easier if you had used Dynamic variables so you could
dynamically name them all in a loop and loop thru them with less difficulty
in getting the high value.
--
Terry

PS: Herešs some sample code from Tomasz:

> Dynamic variable DOES NOT DIFFER from regular AFL variable, it is the SAME
> variable but it just has ability to have
> dynamic identifier.
>  
> See this:
>  
> VarSet( "myvariable", 5 );
>  
> if( myvariable == 5 )   // this 'dynamic variable' works exactly as regular
> variable and can be accessed regular way
> {
>    printf("myvariable has value of 5");
> }
>  
>  
> Dynamic variables were added just to allow writing a loop:
>  
> for( i = 1; i <= 5; i++ )  VarSet( "Var"+i, Ref( C, -i ) );
>  
> instead of 5 statements:
> Var1 = Ref( C, -1 );
> Var2 = Ref( C, -2 );
> Var3 = Ref( C, -3 );
> Var4 = Ref( C, -4 );
> Var5 = Ref( C, -5 );
>  
>  
> but both approaches have the SAME EFFECT -> creation of five regular variables
> called Var1, ...., Var5
>  
> The only "dynamic" thing about dynamic variables is its name (identifier).
>  
> 
> Best regards,
> Tomasz Janeczko
> amibroker.com

--

> 
> 
> I have an indicator which plots 46 lines. I want to plot an additional line
> which will be made constructed using the value of whichever line happens to
> have the Highest value on that day.
> 
> If on Thursday, the line #24 has the highest value, (lets assume it is 32),
> then this one day HHV line will be plotted with a value of 32.  Now lets
> assume that  on Friday, the line #27 has the highest value which happens to be
> 39, then the one day HHV line will be plotted  with a value of 39.   This one
> probably has a Duh answer, but right now I am having difficulty thinking of
> how to do it.  Ron D
> 
> 



------------------------ Yahoo! Groups Sponsor --------------------~--> 
Make a clean sweep of pop-up ads. Yahoo! Companion Toolbar.
Now with Pop-Up Blocker. Get it for free!
http://us.click.yahoo.com/L5YrjA/eSIIAA/yQLSAA/GHeqlB/TM
--------------------------------------------------------------------~-> 

Check AmiBroker web page at:
http://www.amibroker.com/

Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html 
Yahoo! Groups Links

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

<*> 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/