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

Re: [amibroker] Re: Identifying Pnf Patterns



PureBytes Links

Trading Reference Links

I to had the problem of showing the values ito the right of the PnF. 
What I found is that it appeared if I answered NO to the Param 
"Displaythe grid"!

Do not understand why!

Keith

hanan.harush wrote:
> After debugging the code i have found that:
> if (PlotGridLines)
> {
> // plot the values ...
> }
>
> Is never accessed which explains why we can not see the plot.
> i have replaced it ( just for debug ) with:
> if (1==1)
> {
> }
>
> And i can see the Axis values.
>
> Not sure regarding the reason for if to be non true although  i choose
> Yes in ParamToggle()
>
> Hanan
>
>
>
>
>
> --- In amibroker@xxxxxxxxxxxxxxx, "Don Lindberg" <dlindber@xxx> wrote:
>   
>> Graham,
>>
>> Changing the Background color does in fact let AB's normal values
>>     
> show, but
>   
>> that isn't the issue. If you look at  the link called Chart
>> <http://img410.imageshack.us/img410/7813/gridcx0.png>  and Grid you
>>     
> will see
>   
>> that his image shows values in the right (Blank 10) area of the chart
>>     
> with
>   
>> each line of the PnF having its own value. This is what I can't
>>     
> duplicate.
>   
>> Sure I can kind of  interpolate visually from AB's Values, but that is
>>     
> not
>   
>> as quick and easy as having them were he shows them on his chart
>>     
> image. I am
>   
>> just learning how to use PnF charts as Wycoft describes their use to
>> forecast the degree of price movement, and having these values would
>>     
> make
>   
>> that a lot easier. I can't understand why it works for him and not for
>>     
> me!
>   
>>
>> Don Lindberg
>>
>>
>>
>>   _____
>>
>> From: amibroker@xxxxxxxxxxxxxxx [mailto:amibroker@xxxxxxxxxxxxxxx] On
>>     
> Behalf
>   
>> Of Graham
>> Sent: Tuesday, April 24, 2007 9:49 PM
>> To: amibroker@xxxxxxxxxxxxxxx
>> Subject: Re: [amibroker] Re: Identifying Pnf Patterns
>>
>>
>>
>> remove the chartbackground colour and change the colours of the charts
>>     
> so
>   
>> you can see them, the background is overlaying the axes
>>
>>
>>
>> --
>> Cheers
>> Graham
>> AB-Write >< Professional AFL Writing Service
>> Yes, I write AFL code to your requirements
>> http://www.aflwriti <http://www.aflwriting.com> ng.com
>>
>>
>>
>> On 25/04/07, Don Lindberg dlindber@xxxxxxxxxx
>> <mailto:dlindber@... net> wrote:
>>
>> I have copied the new code. Blank bars set to 10. PlotGrid set to Yes.
>> Scaling set to Traditional (I tried the others too) and the following
>>     
> image
>   
>> is what I get! Were are the Values?????? I am using AB 4.93, running
>>     
> on MS
>   
>> Vista Business.
>>
>>
>>
>>   _____
>>
>> From: amibroker@xxxxxxxxx <mailto:amibroker@xxxxxxxxxxxxxxx ps.com
>>     
> [mailto:
>   
>> <mailto:amibroker@xxxxxxxxxxxxxxx  amibroker@xxxxxxxxxxxxxxx] On
>>     
> Behalf Of
>   
>> apfxtrader
>> Sent: Tuesday, April 24, 2007 4:15 PM
>> To: amibroker@xxxxxxxxx <mailto:amibroker@xxxxxxxxxxxxxxx ps.com
>> Subject: [amibroker] Re: Identifying Pnf Patterns
>>
>>
>>
>> Lets go over the steps to plot Chart and Grid once again:
>>
>> Once you copy the new code*  at the end of the message
>>
>> You need to perform the following:
>>
>> Set Blank bars in right margin  to 10 .
>> Preferences Window
>> <http://img458.imageshack.us/img458/4250/preferencesuo6.png>
>>
>> Right click on chart select Parameters and press  "YES"  on "PlotGrid"
>> option.
>> Parameters Window
>> <http://img252.imageshack.us/img252/9647/propertieslu1.png>
>>
>> Note that:
>> Grid is plotted for the chart area in the right of  Vertical Selection
>>     
> Line.
>   
>> Chart and Grid <http://img410.imageshack.us/img410/7813/gridcx0.png>
>>
>> * The following code includes the option to choose form 3 ways  of
>> calculating the box size:
>>
>> 1.      Traditional  (Box size default value  = 1  with increments of
>>     
> 10
>   
>> points)
>>
>> 2.      Percentage (Box size default value 1%  of last value close
>>     
> with
>   
>> increments of 0.1%).
>>
>> 3.      Average True Range (Box size default value last value ATR (20)
>>     
> with
>   
>> increments of 10 % of ATR (20) ).
>>
>> You  can choose to apply this from "Scaling Method" drop down  menu in
>> Parameters
>>
>> Don't forget to check the code in formula editor before you apply
>>
>> //Copy ----------------------------------------------------
>>
>>
>> GraphXSpace = 5;
>>
>> SetChartBkColor(ParamColor("BackGroundColor",  colorBlack));
>> GraphColor =  ParamColor("GarphColor",colorLightGrey);
>> GridColor = ParamColor("GridColor", ColorRGB(39,49, 67) );
>>
>> Scaling = ParamList("Scaling Method", "Traditional|Percentage|AVG True
>> Range");
>>
>> if( scaling == "Traditional")      Box = Param("Box", 1, 0.2, 10,
>>     
> 0.1);
>   
>> else
>> if( scaling == "Percentage")      Box = Pa! ram("Box ", 1, 0.2, 10,
>>     
> 0.1)/100
>   
>> * LastValue(C);
>>
>>
>> else
>> if( scaling == "AVG True Range")  Box = Param("Box", 1, 0.3, 5, 0.1) *
>> LastValue( ATR (20));
>>
>>
>>
>> shiftChart =0;
>> shiftLastClose =1;
>> shiftGrid =7;
>> shiftPriceAxis = 2;
>>
>>
>> Reverse = Param("Reverse", 3, 1, 5);
>> j = 0;
>> PFL[0] = Box * ceil(Low[0]/Box) + Box;
>> PFH[0] = Box * floor(High[0]/Box);
>> direction = 0;
>>
>>
>> for( i = 1; i < BarCount; i++ )
>> {
>> if(direction[j] == 0)
>> {
>> if(Low[i] <= PFL[j] - Box)
>> {
>> PFL[j] = Box * ceil(Low[i]/Box);
>> }
>> else
>> {
>> if(High[i] >= PFL[j] + Reverse*Box)
>> {
>> j++;
>> direction[j] = 1;
>> PFH[j] = Box * floor(High[i]/Box);
>> PFL[j] = PFL[j - 1] + Box;
>>
>> }
>> }
>> }
>> else
>> {
>> if(High[i] >= PFH[j] + Box)
>> {
>> PFH[j] = Box * floor(High[i]/Box);
>> }
>> else
>> {
>> if( Low[i] <= PFH[j] - Reverse * Box )
>> {
>> j++;
>> direction[j] = 0;
>> PFH[j] = PFH[j - 1] - Box;
>> PFL[j] = Box * ceil(Low[i]/Box);
>>
>> }
>> }
>> }
>> }
>> delta = BarCount - j -1;
>> direction = Ref(direction, - delta);
>> Hi = Ref(PFH, -delta) + Box/2;
>> Lo = Ref(PFL, -delta)- Box/2;
>> Cl = IIf(direction == 1, Hi, Lo);
>> Op = IIf(direction == 1, Cl - Box, Cl + Box);
>>
>>
>>
>>
>> PlotOHLC(Op, Hi, Lo, Cl,"", GraphColor ,
>>     
> stylePointAndFigure|styleNoLabel,
>   
>> 0, 0 ,shiftChart);
>>
>>
>>
>> Last = Ref( LastValue(C), -(BarCount-1));
>> Plot( Last,"", colorRed,styleNoLine|styleDots, 0 , 0, shiftLastClose);
>>
>> // selected value
>> Value= IIf(direction>0, SelectedValue(Hi)-box/2,
>>     
> SelectedValue(Lo)+box/2);
>   
>>     
> //----------------------------------------------------------------------\
> -
>   
>> //        GRID CONSTRUCTION
>>
>>     
> //----------------------------------------------------------------------
>   
>> PlotGridLines = ParamToggle("PlotdGrid", "Yes! |No", 0) ;
>>
>>
>>
>> if (PlotGridLines)
>> {
>> begin = SelectedValue(BarIndex());
>> end = LastValue(BarIndex());
>> period = end-begin +1;
>>
>> if( begin<end)
>> {
>>
>>
>> ScreenHigh =LastValue( HHV(cl, period ));
>> ScreenLow =LastValue( LLV( Cl, period) );
>>
>>
>> top= LineArray( begin-shiftGrid, screenHigh, end, screenhigh, 0 , 1);
>> Bot= LineArray( begin-shiftGrid, screenlow, end, screenLow, 0, 1);
>>
>> Plot( top, "", gridColor,styleLine|styleNoLabel , 0, 0,shiftGrid);
>> //Plot( bot, "", gridColor,styleLine|styleNoLabel,  0 , 0 ,
>>     
> shiftGrid);
>   
>> VerticalGrid = IIf ( BarIndex() >= begin, IIf(direction==1,
>>     
> screenHigh,
>   
>> screenLow), Null);
>>
>> Plot (VerticalGrid, "", gridColor, styleStaircase|styleNoLabel, 0,0,
>>     
> 1);
>   
>>     format = 8.2;
>>
>>
>>
>>     for  ( n=LastValue(bot); n< LastValue(top) - 0.5*box; n = n+box)
>>     {
>>
>>     Plot(  bot , "", gridColor, styleLine|styleNoLabel, 0, 0
>>     
> ,shiftGrid);
>   
>>     text = NumToStr(LastValue(bot) + 0.5*box, format);
>>     xposition = BarCount+shiftPriceaxis;
>>     yPosition = LastValue(bot)+0.27*box;
>>
>>     PlotText(text,  xPosition , yPosition, colorWhite);
>>     bot = bot + box;
>>
>>     }
>> }
>>
>> }
>>
>>
>>
>>     
> //---------------------------------------------------------------------
>   
>> //    TITLE
>>
>>     
> //----------------------------------------------------------------------
>   
>> Title = "\n" +
>> " Instrument : " + Name() +  FullName()+"\n " +
>> "Formula : " + " PF StockChart" + "\n " +
>>
>>
>>
>> "Box  : " +  ! box + "& nbsp;    " +
>> "Reverse : " +  reverse + "\n " +
>> "ATR : " + LastValue(ATR(20));
>>
>>     
>
>
>
>
> 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 NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
> http://www.amibroker.com/devlog/
>
> For other support material please check also:
> http://www.amibroker.com/support.html
>  
> Yahoo! Groups Links
>
>
>
>
>   


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 NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/

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/

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