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

Re: [Metastockusers] indicators in metastock



PureBytes Links

Trading Reference Links

{MetaStock code written by Equis and published in the Oct99 TASC}
  {ADX Raw}
Periods:= Input("Enter time periods",1,100,14);
PlusDM:= If(HIGH>Ref(HIGH,-1) AND
LOW>=Ref(LOW,-1), HIGH-Ref(HIGH,-1),
If(HIGH>Ref(HIGH,-1) AND LOW<Ref(LOW,-1)
AND HIGH-Ref(HIGH,-1)>Ref(LOW,-1)-LOW,
HIGH-Ref(HIGH,-1), 0));
DIPlus:= 100 * Wilders(PlusDM,Periods) /
ATR(Periods);
MinusDM:= If(LOW<Ref(LOW,-1) AND
HIGH<=Ref(HIGH,-1), Ref(LOW,-1)-LOW,
If(HIGH>Ref(HIGH,-1) AND LOW<Ref(LOW,-1)
AND HIGH-Ref(HIGH,-1)<Ref(LOW,-1)-LOW,
Ref(LOW,-1)-LOW, 0));
DIMinus:= 100 * Wilders(MinusDM,Periods) /
ATR(Periods);
DIDif:= Abs(DIPlus - DIMinus);
DISum:= DIPlus + DIMinus;
ADXRaw:= 100 * Wilders(DIDif/DISum, Periods);
ADXRaw;
{end of indicator}

Change "ADXRaw" to "Prec(ADXRaw,2)" to get only two decomal places.

Roy

----- Original Message -----
From: "hoho10015" <hoho10015@xxxxxxxxx>
To: <Metastockusers@xxxxxxxxxxxxxxx>
Sent: Saturday, March 08, 2003 5:20 AM
Subject: [Metastockusers] indicators in metastock


> I am a new user of metastock 7.22. I notice that the volume and adx
> indicators are all rounded when they are calculated. Is there any
> way to have the program Calculate the Values of the indicators with
> 2 decimals? Any help would be appreciated.
>
>
> To unsubscribe from this group, send an email to:
> Metastockusers-unsubscribe@xxxxxxxxxxx
>
>
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
>
>
>



To unsubscribe from this group, send an email to:
Metastockusers-unsubscribe@xxxxxxxxxxx

 

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/