PureBytes Links
Trading Reference Links
|
Try this basic indicator example:
===================
Binary Wave example
===================
---8<----------------------
{ Binary Wave example v1.0 }
{ http://www.metastocktools.com }
{ --------------- User inputs ---------------- }
pds1:=Input("Indicator periods 1",1,260,14);
pds2:=Input("Indicator periods 2",1,260,14);
plot:=Input("plot: [1]Binary wave, [2]Signals",1,2,1);
{ ---------------- Indicators ---------------- }
{ Plus Directional Movement }
DIplus:=PDI(pds1);
{ Minus Directional Movement }
DIminus:=MDI(pds1);
{ MACD }
Mac:=MACD();
signal:=Mov(Mac,pds2,E);
{ --------------- Binary wave ---------------- }
signals:=
{ DI+ crosses DI- }
Cross(DIplus,DIminus)
{ DI- crosses DI+ }
-Cross(DIminus,DIplus)
{ MACD crosses signal }
+Cross(Mac,signal)
{ Signal crosses MACD }
-Cross(signal,Mac);
BinWave:=Cum(signals);
{ Plot binary wave indicator in its own window }
If(plot=1,BinWave,signals)
---8<----------------------
jose '-)
http://www.metastocktools.com
[Open mind, Eyes will follow]
--- In equismetastock@xxxxxxxxxxxxxxx, "drk_411" <ramangumber@xxxx>
wrote:
>
> Hi,
>
> I want to experiment with my first indicator which would have a
> summed up value from number of logical evaluations. The problem I am
> facing is "how to sum up the indicator".
>
> My indicator starts with a value of zero. Let's name it
> "MyIndicator"
>
> MyIndicator = 0
> Now
>
> if DI+ crosses DI-, MyIndicator= MyIndicator + 1
> if macd() crosses it's ma again MyIndicator is incrementally
> increased by one so MyIndicator=MyIndicator +1
> Again another evaluation and MyIndicator gets increased, decreased
> or remains same.
> And so on.
>
> After number of logical if's and summed up, the final MyIndicator
> is drawn.
>
> I know and promise that I don't have any earth shattering formula,
> but being a neophyte want some kind soul to write up the empty
> code, so that i could fill in the blanks and learn in the process.
>
> Thanks in advance and regards.
>
> Dr. Raman Kumar.
> [Eyes don't see, what mind doe's not know]
------------------------ Yahoo! Groups Sponsor --------------------~-->
Try Online Currency Trading with GFT. Free 50K Demo. Trade
24 Hours. Commission-Free.
http://us.click.yahoo.com/RvFikB/9M2KAA/U1CZAA/BefplB/TM
--------------------------------------------------------------------~->
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/equismetastock/
<*> 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/
|