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

[amibroker] Re: help needed on adx coding.



PureBytes Links

Trading Reference Links

Hi all,

I am posting my below msg once again as the thread next to my msg, 
contained discussion not relevant to the subject of this msg, but 
more so with the search feature or the absence of it.

I would appreciate if someone can correct this code below.

Prashant


--- In amibroker@xxxxxxxxxxxxxxx, "Prashant Nayak" <pnayak@xxx> wrote:
>
> Hi,
> 
> I have the attempt below, after reading the link provided by 
Tomasz, 
> though this works for rsi price forecast as was the subject of the 
> thread, I am finding difficulty in the following code when it comes 
> to adx.
> 
> I would appreciate if some expert can correct this code for 
> determining price at which PDI crosses MDI.
> 
> 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()-MDI(); 
> Goal = 
> LastValue(PDI()-MDI()==0); 
>  
> 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); 
> a=
> MACD()<Signal(); 
> PBuy=
> MACD()<Signal(); 
> PSell=
> MACD()>Signal(); 
> Filter
> = BarIndex() == LVBI; 
> //Filter=1;
> AddColumn
> (Ref(P1, -1) / Mult, "Todays Price", 1.2); 
> AddColumn
> (P1 / Mult, "Goal Price", 1.2); 
> AddColumn
> (P0-P1 , "Goal Price diff", 1.2);
> 
> 
> Prashant.
> 
> 
> 
> 
> --- In amibroker@xxxxxxxxxxxxxxx, "Tomasz Janeczko" <groups@> 
> wrote:
> >
> > It was discussed in detail before. Use search.
> > See for example this:
> > http://finance.groups.yahoo.com/group/amibroker/message/116612
> > 
> > and the entire thread.
> > 
> > Best regards,
> > Tomasz Janeczko
> > amibroker.com
> > ----- Original Message ----- 
> > From: "Prashant Nayak" <pnayak@>
> > To: <amibroker@xxxxxxxxxxxxxxx>
> > Sent: Thursday, November 29, 2007 5:32 PM
> > Subject: [amibroker] Re: help needed on adx coding.
> > 
> > 
> > > Dear friends,
> > > 
> > > Bit dissapointed, nobody comming forward to help a person stuck 
> with 
> > > the coding.
> > > 
> > > is it really uncodeable ?
> > > 
> > > Prashant
> > > 
> > > --- In amibroker@xxxxxxxxxxxxxxx, "Prashant Nayak" <pnayak@> 
> wrote:
> > >>
> > >> Hi friend,
> > >> 
> > >> even this does not work. Seniors please help to rectify this 
> code 
> > > or 
> > >> a new code please.
> > >> 
> > >> Tomas, pls help.
> > >> 
> > >> Pras
> > >> 
> > >> --- In amibroker@xxxxxxxxxxxxxxx, 
"vichooo_1999" <vichooo_1999@> 
> > >> wrote:
> > >> >
> > >> > 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@> 
> wrote:
> > >> > >
> > >> > > A starting point is the folder in the Files section titled 
> > > "Cross 
> > >> > Predictions"
> > >> > > 
> > >> > > Bill
> > >> > > 
> > >> > > ----- Original Message ----- 
> > >> > > From: "Prashant Nayak" <pnayak@>
> > >> > > 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
> > > 
> > > 
> > > 
> > > 
> > >
> >
>




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/