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

[EquisMetaStock Group] Synthetic cycle generator v3.0



PureBytes Links

Trading Reference Links

This update to the synthetic cycle generator generates smooth sine 
waves, and plots a true synthetic pattern based on the composite of 
these five pure sine waves.


=========================
Synthetic cycle generator
=========================
---8<----------------------------------

{ 5-wave synthetic cycle generator v3.0 }
{ Refresh chart for new simulations }

{ Download  Random.dll  from
  http://www.traderhelp.net  and place in
  MetaStock External Function DLLs folder }

{ Idea seed from Andy Davidson at:
http://finance.groups.yahoo.com/group/equismetastock , and:
 http://www.stockmarketcycles.com/technica.htm }

{ ©Copyright 2005 Jose Silva
  For personal use only.
  http://www.metastocktools.com }

{ User inputs }
plot:=Input("Sine-wave cycles:  [1]Composite,  [2]Individual",1,2,1);
Sval1:=Input("Sine 1 value",-720,720,1);
Sval2:=Input("Sine 2 value",-720,720,3.5);
Sval3:=Input("Sine 3 value",-720,720,12);
Sval4:=Input("Sine 4 value",-720,720,42);
Sval5:=Input("Sine 5 value",-720,720,150);

{ Random generator engine }
x:=LastValue(
 ExtFml("Random.Number",-1)/66.66667+.5);

{ Sine components }
sine1:=Sin(Cum(Sval1*x));
x:=LastValue(
 ExtFml("Random.Number",-1)/66.66667+.5);
sine2:=Sin(Cum(Sval2*x))*.5;
x:=LastValue(
 ExtFml("Random.Number",-1)/66.66667+.5);
sine3:=Sin(Cum(Sval3*x))*.25;
x:=LastValue(
 ExtFml("Random.Number",-1)/66.66667+.5);
sine4:=Sin(Cum(Sval4*x))*.125;
x:=LastValue(
 ExtFml("Random.Number",-1)/66.66667+.5);
sine5:=Sin(Cum(Sval5*x))*.0625;

{ Composite Sine }
composite:=sine1+sine2+sine3+sine4+sine5;

{ Plot in own window }
If(plot=1,composite,sine1);
If(plot=1,composite,sine2);
If(plot=1,composite,sine3);
If(plot=1,composite,sine4);
If(plot=1,composite,sine5)

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


jose '-)
http://www.metastocktools.com







------------------------ Yahoo! Groups Sponsor --------------------~--> 
Help tsunami villages rebuild at GlobalGiving. The real work starts now.
http://us.click.yahoo.com/njNroD/KbOLAA/cosFAA/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/