PureBytes Links
Trading Reference Links
|
> Very nice indicator!
it wasnt nice - but it worked - in the meantime I realized that it could be written
much easier:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
vars:Mo(0), quarter(0);
Mo = month(date);
if Mo = 1 and Mo <> Mo[1] then quarter = c[1];
if Mo = 4 and Mo <> Mo[1] then quarter = c[1];
if Mo = 7 and Mo <> Mo[1] then quarter = c[1];
if Mo = 10 and Mo <> Mo[1] then quarter = c[1];
plot1(quarter,"quarter");
plot2(quarter*1.1,"+10%");
plot3(quarter*0.9,"-10%");
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
thats all and does the same job !!!!!
> How could it be modified to allow the percentage above to be
> different from the percentage below?
simple: just change the UPPER + LOWER inputs
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
input: UPPER(10),LOWER(-10);
vars:Mo(0), quarter(0);
Mo = month(date);
if Mo = 1 and Mo <> Mo[1] then quarter = c[1];
if Mo = 4 and Mo <> Mo[1] then quarter = c[1];
if Mo = 7 and Mo <> Mo[1] then quarter = c[1];
if Mo = 10 and Mo <> Mo[1] then quarter = c[1];
plot1(quarter,"quarter");
plot2(plot1 * (1 + (UPPER/100)),"upper");
plot3(plot1 * (1 + (LOWER/100)),"lower");
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> and, allow the time frame to be
> varied so that it would be whatever number of days (time periods /
> bars) from the start date (period).
that gets a bit complicated WITH aboves code - it certainly can be done,
but Im not bored enough at the moment :-))))))
rgds hans
> I see this could be useful in conjunction with some cycle analysis.
> Anybody else have some ideas?
> Bert.
>
> hans esser wrote:
> >
> > > Anyone can direct me in the right direction. I am trying to create an
> > > indicator that draw a straight line for three month.
> > >
> > > Some thing like this:
> > >
> > > Last day in December. Take the close, add 10% subtract 10%. Draw a
> > > straight line for three month (Jan.,Feb,Mar.) on the 10% channels.
> > >
> > > Last day in March. Take the close, add 10% subtract 10%. Draw a
> > > straight line for three month (April,....).
> > >
> > > Do not connect the lines. That means they end as a straight line. Some
> > > thing like:
> >
> > > ____________________
> > >
> > > __________________________
> > >
> > > ____________________
> > >
> > ___________________________
> > >
> > > In between you have the O,H,L,C bar chart.
> > >
> > > Thanks.
> > >
> > > Volker
> >
> > surrrrreeeeee - attached is the VK.ELA, the VK.gif (hope it will get
> > through the list size filter) - and the TEXT version is below
> >
> > BTW: you sure can do that with the TRENDLINE code too - (but not me <g>)
> >
> > rgds hans
> > EL for runnaways
> > no webpage
> > nothing to sell
> >
> > IMPORTANT: set the PLOTS to DOTS and NOT lines.......
> > ~~~~~~~~~~~~~~~~
> >
> > vars:Mo(0), quarter(0);
> >
> > Mo = month(date);
> >
> > if Mo = 1 and Mo <> Mo[1] then quarter = c[1];
> >
> > if Mo >=1 and Mo < 4 then begin
> > plot1(quarter,"quarter");
> > plot2(quarter*1.1,"+10%");
> > plot3(quarter*0.9,"-10%");
> > end;
> >
> > if Mo = 4 and Mo <> Mo[1] then quarter = c[1];
> >
> > if Mo >=4 and Mo < 7 then begin
> > plot1(quarter,"quarter");
> > plot2(quarter*1.1,"+10%");
> > plot3(quarter*0.9,"-10%");
> > end;
> >
> > if Mo = 7 and Mo <> Mo[1] then quarter = c[1];
> >
> > if Mo >=7 and Mo < 10 then begin
> > plot1(quarter,"quarter");
> > plot2(quarter*1.1,"+10%");
> > plot3(quarter*0.9,"-10%");
> > end;
> >
> > if Mo = 10 and Mo <> Mo[1] then quarter = c[1];
> >
> > if Mo =10 or Mo =11 or Mo = 12 then begin
> > plot1(quarter,"quarter");
> > plot2(quarter*1.1,"+10%");
> > plot3(quarter*0.9,"-10%");
> > end;
> >
> > ~~~~~~~~~~~~
> > PS:
> >
> > Now I only need to know what you do with that ? :-))))
> >
> > --------------------------------------------------------------------
> > The following section of this message contains a file attachment
> > prepared for transmission using the Internet MIME message format.
> > If you are using Pegasus Mail, or any another MIME-compliant system, you
> > should be able to save it or view it from within your mailer. If you
> > cannot, please ask your system administrator for assistance.
> >
> > ---- File information -----------
> > File: vk.gif
> > Date: 7 Oct 1999, 17:58
> > Size: 9134 bytes.
> > Type: GIF-image
> >
> > --------------------------------------------------------------------
> > Name: vk.gif
> > vk.gif Type: GIF Image (Image/GIF)
> > Encoding: BASE64
> >
> > --------------------------------------------------------------------
> > The following section of this message contains a file attachment
> > prepared for transmission using the Internet MIME message format.
> > If you are using Pegasus Mail, or any another MIME-compliant system, you
> > should be able to save it or view it from within your mailer. If you
> > cannot, please ask your system administrator for assistance.
> >
> > ---- File information -----------
> > File: Vk.ela
> > Date: 7 Oct 1999, 18:02
> > Size: 3294 bytes.
> > Type: Unknown
> >
> > --------------------------------------------------------------------
> > Name: Vk.ela
> > Vk.ela Type: unspecified type (Application/Octet-stream)
> > Encoding: BASE64
>
|