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

[amibroker] Re: Drawing Support and Resistance horizontal lines on intra day chart(Solved)



PureBytes Links

Trading Reference Links


Thanks Walt... I am able to complete with the below give formulae... 
once again thanks a lot.....

--- In amibroker@xxxxxxxxxxxxxxx, "hairy_mug" <WSCHWARZ@xxxx> wrote:
> 
> Govind,
> 
> Y co-ordinates do not need to be integers, just use your values.
> 
> x0 = valuewhen(StartOfDay,barindex());
> x1 = barindex();
> 
> "extend" as preffered
> 
> "usebarindex" should be set to true
> 
> give it a try...
> 
> Walt
> 
> --- In amibroker@xxxxxxxxxxxxxxx, "Govind" <share.interest@xxxx> 
> wrote:
> > 
> > 
> > mhh... Thank you for the pointer... I was just playing around 
the 
> > LineArray function and my requirement. Now x0,x1 co-ordinate 
should 
> > be a date starting from the intra day time to the current time. 
> Here 
> > are my few doubts to use this formula to achieve what i require.
> > 
> > 1. In the below formula it seems that the support and resistance 
> > values will be decimal. How do I convert it into integer so that 
> the 
> > lineArray functions accepts the same.The formatted support and 
> > resistance values will be the y co-ordinates(both y0,y1 will be 
the 
> > same in this case).
> >    
> > Reference:    Line = LineArray( x0, y0, x1, y1, 1,False ); 
> >   
> > 2. As I said earlier I would like to draw the horizantal line 
only 
> > for that particular day. So I need to identify the intra day 
start 
> > date (automatically) convert it into a integer format(acceptable 
by 
> > AB) and then current date at the time the line is plot. This 
will 
> be 
> > x0 and x1 co-ordinates
> > 
> > I searched and found the following formula.. But I am not sure 
how 
> > to use this...
> > 
> > StartOfDay = DateNum() != Ref( DateNum(), -1 );
> > EndOfDay = Ref( StartOfDay, 1 );
> > 
> > Any help would be highly appreciated.
> > 
> > Thanks,
> > Govind
> > --- In amibroker@xxxxxxxxxxxxxxx, "hairy_mug" <WSCHWARZ@xxxx> 
wrote:
> > > 
> > > Try the linearray function:
> > > 
> > > Plot(LineArray(BarCount-20,resValue,BarCount-
> > > 1,ResValue,1),"R",colorGold);
> > > 
> > > 
> > > --- In amibroker@xxxxxxxxxxxxxxx, G <share.interest@xxxx> 
wrote:
> > > >  
> > > > Friends,
> > > > 
> > > >   I have the following requirement.
> > > > 
> > > >   I have support and resistance for nifty index (India) for 
the 
> > > day. I would like
> > > > to draw these lines in the intra day charts. I would like to 
> > know 
> > > how
> > > > to draw it. I tried my hands with the AFL but it in vain. I 
have
> > > > attached the sample image of what I am trying to achieve. 
The 
> > yellow
> > > > horizontal lines are the support and resistance. I also want 
> > them to
> > > > be of different color. Can anybody help me out on how to 
> achieve 
> > > this?
> > > >  
> > > >  Below is the formula that i have used.. 
> > > > DP=(H+L+C)/3;
> > > > 
> > > > R1=(2*DP)-L;
> > > > 
> > > > S1=(2*DP)-H;
> > > > 
> > > > T1=(R1-S1);
> > > > 
> > > > T2=(R1-S1);
> > > > 
> > > > R2=DP+T1;
> > > > 
> > > > S2=DP-T2;
> > > > 
> > > >  
> > > > 
> > > > Plot(C,"Close",colorBlack,styleBar);
> > > > 
> > > > Plot(R1,"Resistance1",colorRed,styleLine);
> > > > 
> > > > Plot(R2,"Resistance2",colorOrange,styleLine);
> > > > 
> > > > Plot(S1,"Support1",colorDarkBlue,styleLine);
> > > > 
> > > > Plot(S2,"Support2",colorGreen,styleLine);
> > > > 
> > > >  
> > > > 
> > > > Plot(DP,"Pivot",colorPink,styleLine);
> > > > 
> > > >  
> > > > 
> > > > Actually what I want is to calculate the support and 
resistance 
> > > from closing values of the previous day and draw the linear 
lines 
> > on 
> > > the intraday chart... The above draws the graph for each 
candle 
> of 
> > > the intraday. Also I would like to super impose these lines on 
> the 
> > > inbuilt price charts of AmiBroker. If mail not clear let me 
know 
> > so 
> > > that I will try to rephrase my words.
> > > > 
> > > >  
> > > > 
> > > > Cheers,
> > > > Govind
> > > > 
> > > > 
> > > > 
> > > > 
> > > > 
> > > > 
> > > > 
> > > > 
> > > > ---------------------------------
> > > > Celebrate Yahoo!'s 10th Birthday! 
> > > > Yahoo! Netrospective: 100 Moments of the Web 
> > > > 
> > > > 
> > > > 		
> > > > ---------------------------------
> > > > Do you Yahoo!?
> > > >  Yahoo! Small Business - Try our new resources site!





------------------------ Yahoo! Groups Sponsor --------------------~--> 
Has someone you know been affected by illness or disease?
Network for Good is THE place to support health awareness efforts!
http://us.click.yahoo.com/Rcy2bD/UOnJAA/cosFAA/GHeqlB/TM
--------------------------------------------------------------------~-> 

Please note that this group is for discussion between users only.

To get support from AmiBroker please send an e-mail directly to 
SUPPORT {at} amibroker.com

For other support material please check also:
http://www.amibroker.com/support.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/