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

[amibroker] AmiBroker 4.50.8 Maintenance Update released



PureBytes Links

Trading Reference Links

I use pivot points support and resistance, but not exactly what you 
have here.  I use the original daily support and resistance in AFL 
library.  Anyway, try this at the end of your code:

/* Set up the grid */ 
GridLineCount = Param("Number of gridlines", 5, 2, 20, 1 ); 

BarVisible = Status( "barvisible" ); 
HVH = LastValue( Highest( ValueWhen( BarVisible , H ) ) ); 
LVL = LastValue( Lowest( ValueWhen( BarVisible , L ) ) ); 

HighGridBar = HVH; 
LowGridBar = LVL; 

PlotGrid( HighGridBar, colorBlack ); 
PlotGrid( LowGridBar, colorBlack ); 

Gap = ( HighGridBar - LowGridBar ) / ( GridLineCount - 1 ); 
GridLine = LowGridBar; 

for( i = 1; i < GridLineCount - 1 ; i++ ) 
{ 
    
   GridLine = GridLine + Gap; 
   PlotGrid( GridLine, colorBlack ); 
} 

GraphXSpace = 5; 

rgds, Pal

--- In amibroker@xxxxxxxxxxxxxxx, "John" <jea55129@xxxx> wrote:
> Ara,
> 
> I found out that if you comment out either the support or 
resistance 
> plots that are the farthest away from the candles does the trick. 
But 
> this will require daily tinkering. Not exactily what I had in mind 
> but it does work. 
> 
> The styleownscale on the sr plots doesn't seem to work. If you 
> notice, the sr plots do not corrolate with the actual price. So 
when 
> you are watching it rt and the candles get close to s or r lines, 
in 
> reality it's not. 
> 
> Thanks for taking a look at the code. Look forward to seeing 
> your "switch" when it's completed.
> 
> Regards,
> 
> John
> 
> 
>  --- In amibroker@xxxxxxxxxxxxxxx, "Ara Kaloustian" <ara1@xxxx> 
wrote:
> > r1,r2,s1,s2 are usually close enough to prices that everything 
> looks OK. S/R
> > values further out are frequently too far from prices to show up 
on 
> screen
> > without compressing chart.
> > 
> > I think the best compromise is to plot prices normally, then use
> > "stylenorescale" option  for plotting the SR lines
> > 
> > If you want to see everything on the screen, then having a 
software 
> (manual)
> > switch might do the trick. I am looking into this now ... may 
have 
> someting
> > in a couple of days
> > 
> > 
> > ----- Original Message ----- 
> > From: "John" <jea55129@xxxx>
> > To: <amibroker@xxxxxxxxxxxxxxx>
> > Sent: Wednesday, January 14, 2004 8:16 AM
> > Subject: [amibroker] Pivot Problem
> > 
> > 
> > > Group,
> > >
> > > I have a pivot formula and am having a problem with the candles 
> not
> > > being very big. If I try the |styleownscale on the candle/code 
the
> > > candles are fine but
> > > the pivots do not correspond with the candles. Any thoughts?  
> Here is
> > > the code:
> > >
> > > TO = TimeFrameGetPrice( "O", inDaily, 0 );
> > > TimeFrameSet( inDaily );
> > > R5=(H/L)*C;
> > > R4=(((H/L)+1)/2)*TO;
> > > R3=(((H/L)+3)/4)*TO;
> > > R2=(((H/L)+5)/6)*TO;
> > > R1=(((H/L)+10)/11)*TO;
> > >
> > > S5=TO-(R5-TO);
> > > S4=TO-(R4-TO);
> > > S3=TO-(R3-TO);
> > > S2=TO-(R2-TO);
> > > S1=TO-(R1-TO);
> > >
> > > TimeFrameRestore();
> > >
> > >
> > > DailyS1=TimeFrameExpand(S1,inDaily);
> > > DailyS2=TimeFrameExpand(S2,inDaily);
> > > DailyS3=TimeFrameExpand(S3,inDaily);
> > > DailyS4=TimeFrameExpand(S4,inDaily);
> > >
> > > DailyR1=TimeFrameExpand(R1,inDaily);
> > > DailyR2=TimeFrameExpand(R2,inDaily);
> > > DailyR3=TimeFrameExpand(R3,inDaily);
> > > DailyR4=TimeFrameExpand(R4,inDaily);
> > >
> > > DailyPvt=TimeFrameExpand(R5,inDaily); //expanded
> > > PlotOHLC( Open, High, Low, Close, "Daily Close", 
colorIndigo,64 );
> > > //PlotOHLC( Open, High, Low, Close, "Daily Close",
> > > colorIndigo,64|styleOwnScale);
> > >
> > > Plot( DailyS1, "DailyS1", 1,1,1.4);
> > > Plot( DailyS2, "DailyS2", 2,1,1.4 );
> > > Plot( DailyS3, "DailyS3", 3,1,1.4 );
> > > Plot( DailyS4, "DailyS4", 4,1,1.4 );
> > >
> > > Plot( DailyR1, "DailyR1",5,1,1.4);
> > > Plot( DailyR2, "DailyR2",6,1,1.4);
> > > Plot( DailyR3, "DailyR3",7,1,1.4);
> > > Plot( DailyR4, "DailyR4",10,1,1.4);
> > >
> > > Plot(DailyPvt, "DailyPvt",9,1,1.4); //plot
> > >
> > >
> > >
> > > Thanks
> > >
> > > John
> > >
> > >
> > >
> > > Send BUG REPORTS to bugs@xxxx
> > > Send SUGGESTIONS to suggest@xxxx
> > > -----------------------------------------
> > > Post AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx
> > > (Web page: http://groups.yahoo.com/group/amiquote/messages/)
> > > --------------------------------------------
> > > 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/
> > >
> > >


Send BUG REPORTS to bugs@xxxxxxxxxxxxx
Send SUGGESTIONS to suggest@xxxxxxxxxxxxx
-----------------------------------------
Post AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx 
(Web page: http://groups.yahoo.com/group/amiquote/messages/)
--------------------------------------------
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/