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

Re: [amibroker] Re: Is it possible to divide an indicator pane into several zones?


  • To: <amibroker@xxxxxxxxxxxxxxx>
  • Subject: Re: [amibroker] Re: Is it possible to divide an indicator pane into several zones?
  • From: "Anthony Faragasso" <ajf1111@xxxxxxxx>
  • Date: Tue, 17 Nov 2009 19:08:22 -0500

PureBytes Links

Trading Reference Links



Hello,
 
I changed each LVB line ( 2 ) locations  to the following.
 

lvb =BarCount-1;//Status( "lastvisiblebar" );

It now plots no matter with blank bars to the right...

----- Original Message -----
From: Bisto
Sent: Tuesday, November 17, 2009 4:36 PM
Subject: [amibroker] Re: Is it possible to divide an indicator pane into several zones?

 

You are right!

I don't use blank bars at the right indeed, so I never noticed it before

if you set them at 0 it works

I will appreciate if you'll keep me informed if you change the code to solve this bug

Bisto

--- In amibroker@xxxxxxxxxps.com, "Anthony Faragasso" <ajf1111@xxx> wrote:
>
> Hello,
>
> I believe it is because if you have blank bars to the right of the last visible price...it produces error....
>
>
> ----- Original Message -----
> From: Bisto
> To: amibroker@xxxxxxxxxps.com
> Sent: Tuesday, November 17, 2009 4:05 PM
> Subject: [amibroker] Re: Is it possible to divide an indicator pane into several zones?
>
>
>
> I post it again with copy & paste from AB where it's running ok... who knows?
>
> function MinZone( array, PercZoneLow, PercZoneHigh )
> {
> fvb = Status( "firstvisiblebar" );
> lvb = Status( "lastvisiblebar" );
> HHVMax = -100000000;
> LLVMin = 100000000;
>
> for ( i = fvb; i <= Lvb; i++ )
> {
> HHVMax = Max( array[ i ], HHVMax );
> LLVMin = Min( array[ i ], LLVMin );
> }
>
> MinZ = ( PercZoneLow * HHVMax - PercZoneHigh * LLVMin ) / ( PercZoneLow - PercZoneHigh );
>
> return MinZ ;
> }
>
> function MaxZone( array, PercZoneLow, PercZoneHigh )
> {
> fvb = Status( "firstvisiblebar" );
> lvb = Status( "lastvisiblebar" );
> HHVMax = -100000000;
> LLVMin = 100000000;
>
> for ( i = fvb; i <= Lvb; i++ )
> {
> HHVMax = Max( array[ i ], HHVMax );
> LLVMin = Min( array[ i ], LLVMin );
> }
>
> MinZ = ( PercZoneLow * HHVMax - PercZoneHigh * LLVMin ) / ( PercZoneLow - PercZoneHigh );
>
> MaxZ = ( LLVMin - MinZ ) / PercZoneLow + MinZ;
>
> return MaxZ ;
> }
>
> // example: use the above functions to define min and max values of styleownscale
>
> // please note that axes type has to be linear (logartimic type requests little modification in the code)
> // please also note that plot style has to be ALSO styleOwnScale
>
> PercZoneLow1 = Param("PercZoneLow1",0.3,0.000001,1,0.05) ;
> PercZoneHigh1 = Param("PercZoneHigh1 ",1,0.000001,1,0.05) ;
>
> Plot( C, "C in zone", colorBlack, styleCandle | styleOwnScale, MinZone(C,PercZoneLow1,PercZoneHigh1), MaxZone(C,PercZoneLow1,PercZoneHigh1));
>
> PercZoneLow2 = Param("PercZoneLow2",0.00001,0.000001,1,0.05) ;
> PercZoneHigh2 = PercZoneLow1 ;
>
> // in case of time consuming array avoid to calculate 3 times
> arraylongtobecalculated = al = ATR(14);
>
> Plot( al, "ATR(14) in zone", colorRed, styleLine | styleOwnScale, MinZone(al,PercZoneLow2,PercZoneHigh2), MaxZone(al,PercZoneLow2,PercZoneHigh2));
>
> --- In amibroker@xxxxxxxxxps.com, "Anthony Faragasso" <ajf1111@> wrote:
> >
> > Hello,
> >
> > Formula returns Subscript out of range error..
> >
>



__._,_.___


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





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

__,_._,___