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

Re: [EquisMetaStock Group] Re: help needed !



PureBytes Links

Trading Reference Links

Thanks, Jose

Jose Silva <josesilva22@xxxxxxxxx> wrote:          Seow, this indicator code will get you started:

====================
Monthly custom Pivot
====================
---8<-----------------------------------------

{ Plots main pivot monthly value on EOD charts.
Adapted from:
http://www.metastocktools.com/MACDH/Forex.htm

©Copyright 2004~2006 Jose Silva.
The grant of this license is for personal use
only - no resale or repackaging allowed.
All code remains the property of Jose Silva.
http://metastocktools.com }

{ User inputs }
pds1:=Input("Pivot's monthly SMA periods",
1,120,5);
pds:=Input("Use Highest/Lowest of past x months",1,12,1);

{ Month's start }
start:=Month()<>Ref(Month(),-1) OR Cum(1)=2;

{ Previous x Months' High }
Hd:=HighestSince(pds,start,H);
Hd:=ValueWhen(1,start,ValueWhen(2,1,Hd));
Hd:=ValueWhen(1,Hd<>0,Hd);

{ Previous x Months' Low }
Ld:=LowestSince(pds,start,L);
Ld:=ValueWhen(1,start,ValueWhen(2,1,Ld));
Ld:=ValueWhen(1,Ld<>0,Ld);

{ Previous Month's Close }
Cd:=ValueWhen(1,start,ValueWhen(2,1,C));
Cd:=ValueWhen(1,Cd<>0,Cd);

{ Pivot }
pivot:=(Hd+Ld+Cd)/3;

{ Monthly SMA }
x:=Cum(start*pivot);
MthSma:=(x-ValueWhen(pds1+1,start,x))/pds1;

{ Plot on price chart }
MthSma; { Red }
pivot; { Blue }

---8<-----------------------------------------

jose '-)
http://metastocktools.com

--- In equismetastock@xxxxxxxxxxxxxxx, "cwseow" <cwseow@xxx> wrote:
>
> Hi all,
> 
> Need some help here, hope someone can help me with it.
> 
> 1) For plotting on charts, I intend to create a pivot point line
> (based on EOD) and a Moving average (userdefine) of the pivot
> point and plot both line on the price chart.
> Pivot = (H+L+C) / 3
> 
> 2) For explorer to filter stocks, for Long (when pivot line cross
> above Pivot MA(5)) and vise-versa for short.
> 
> 3) For Expert advisor, to indicate Long ( when pivot line cross
> above Pivot MA(5), and vise-versa for Short
> 
> Many Thanks in advance.
> 
> Best regards,
> ~Seow



         

 
---------------------------------
Everyone is raving about the all-new Yahoo! Mail beta.

[Non-text portions of this message have been removed]




 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/equismetastock/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/equismetastock/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:equismetastock-digest@xxxxxxxxxxxxxxx 
    mailto:equismetastock-fullfeatured@xxxxxxxxxxxxxxx

<*> To unsubscribe from this group, send an email to:
    equismetastock-unsubscribe@xxxxxxxxxxxxxxx

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