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

[amibroker] Re: help needed on adx coding.



PureBytes Links

Trading Reference Links

I think u r looking for a forecaster which gives a value at which +DI 
will cross -DI.

Try the following


P0 = C;

Acc = 0.0001;

LVBI = LastValue(BarIndex());
Mult = 1;
for (i = 0; i < 10; i++)
{
if (P0[LVBI] >= 1)
i = 99;
else
Mult = Mult * 10;
}
// ***********************************************

P1 = Ref(P0, 1) * Mult;
UpDn = 100 * P1[LVBI];

for (i = 0; i < 200; i++)
{

Calc = PDI();
Calc = MDI();

Goal = LastValue(cross(PDI(),MDI()));

if (Calc[LVBI] < Goal)
P1[LVBI] = P1[LVBI] + UpDn;
else
P1[LVBI] = P1[LVBI] - UpDn;
UpDn = UpDn / 2;
if (UpDn <= Acc)
{
j = i;
i = 99999;
}
}

Accuracy = 100 * (abs(Goal - Calc) / Goal);
Filter = BarIndex() == LVBI;
AddColumn(Ref(P1, -1) / Mult, "Todays Price", 1.2);
AddColumn(P1 / Mult, "Goal Price", 1.2);
AddColumn(P0-P1 , "Goal Price diff", 1.2);






tyr and see if it works. I f it does not then some seniorguys have to 
rectify the code.

cheers











--- In amibroker@xxxxxxxxxxxxxxx, "wavemechanic" <fimdot@xxx> wrote:
>
> A starting point is the folder in the Files section titled "Cross 
Predictions"
> 
> Bill
> 
> ----- Original Message ----- 
> From: "Prashant Nayak" <pnayak@xxx>
> To: <amibroker@xxxxxxxxxxxxxxx>
> Sent: Tuesday, November 20, 2007 12:38 PM
> Subject: [amibroker] Re: help needed on adx coding.
> 
> 
> > Thanks Prashanth, but valuewhen syntax will not work here. what i 
> > need to code for a adx forecaster which gives out the price at 
which 
> > it will become a buy.
> > 
> > Pls help me code a forecaster for adx.
> > 
> > Prashant
> > 
> > --- In amibroker@xxxxxxxxxxxxxxx, "Prashanth" <prash454.ta@> 
wrote:
> >>
> >> Have you checked out "Valuewhen" Syntax.
> >> 
> >> Cheers
> >> 
> >> Prashanth
> >> 
> >>   ----- Original Message ----- 
> >>   From: Prashant Nayak 
> >>   To: amibroker@xxxxxxxxxxxxxxx 
> >>   Sent: Monday, November 19, 2007 10:36 PM
> >>   Subject: [amibroker] Re: help needed on adx coding.
> >> 
> >> 
> >>   Dear Friends,
> >> 
> >>   I look forward to your help pls.
> >> 
> >>   Pras
> >> 
> >>   --- In amibroker@xxxxxxxxxxxxxxx, "Prashant Nayak" <pnayak@> 
> > wrote:
> >>   >
> >>   > Dear Friends,
> >>   > 
> >>   > I would highly appreciate if anybody can help me on the 
below 
> >>   issue, 
> >>   > as i am otherwise stuck on my coding.
> >>   > 
> >>   > Prashant.
> >>   > 
> >>   > 
> >>   > --- In amibroker@xxxxxxxxxxxxxxx, "Prashant Nayak" <pnayak@> 
> > wrote:
> >>   > >
> >>   > > Dear friends,
> >>   > > 
> >>   > > I am trying to code adx explorer on crossover, but need 
help 
> > on 
> >>   the 
> >>   > > following:
> >>   > > 
> >>   > > how to determine the price at which +di will cross -di
> >>   > > 
> >>   > > Appreciate help on the same from experts.
> >>   > > 
> >>   > > Prashant
> >>   > >
> >>   >
> >>
> > 
> > 
> > 
> > 
> > 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
> > 
> > 
> > 
> > 
> > 
> > -- 
> > No virus found in this incoming message.
> > Checked by AVG Free Edition. 
> > Version: 7.5.503 / Virus Database: 269.16.1/1140 - Release Date: 
11/19/2007 7:05 PM
> > 
> >
>




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/