logo
Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Options
Go to last post Go to first unread
huss1652  
#1 Posted : Wednesday, May 25, 2011 4:59:42 PM(UTC)
huss1652

Rank: Newbie

Groups: Registered, Registered Users
Joined: 4/7/2011(UTC)
Posts: 9

I am trying to code a very long code in system tester and it says there is no more room. Can I use a function that has inputs in it and control the inputs with my OPTs in system tester? If so, how!?
huss1652  
#2 Posted : Wednesday, May 25, 2011 5:15:06 PM(UTC)
huss1652

Rank: Newbie

Groups: Registered, Registered Users
Joined: 4/7/2011(UTC)
Posts: 9

I want to use this formula from an indicator but the pr,choose,and multi1 to be Optimizer Variables and the Output from my Indicator to be the Ema. I hope someone can help me. pr:=Input("ZigZag cycle reversal %",0,100,5); choose:=Input("EMA periods based on: [1]Cycle, [2]Cycle Avg",1,2,1); multi1:=Input("EMA periodicity: Cycle/Avg length x",.1,100,2); x:=C; zz:=Zig(x,pr,%); zzpk:=Ref(zz,-1)>zz AND Ref(zz,-1)>Ref(zz,-2); zztr:=Ref(zz,-1)<zz AND Ref(zz,-1)<ref(zz,-2); PkTr:=zzpk OR zztr; CycleLen:=PkTr*(Ref(BarsSince(PkTr),-1)+1); CycleCount:=Cum(PkTr)-1; CycleCount:=If(CycleCount=0,.000001,CycleCount); CycleLenAvg:=Cum(CycleLen)/CycleCount; pds:=If(choose=1,ValueWhen(1,CycleLen>0 AND CycleCount>0,CycleLen),CycleLenAvg)*multi1; Init:=CycleCount=1 AND Alert(CycleCount<1,2); pds:= If(pds>BarsSince(Init),BarsSince(Init),pds); pds:=If(pds<1,1,pds); Ema:=x*2/(pds+1)+PREV*(1-2/(pds+1)); Ema;
jjstein  
#3 Posted : Thursday, May 26, 2011 7:40:20 AM(UTC)
jjstein

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers
Joined: 5/13/2005(UTC)
Posts: 715
Location: Midwest, USA

Was thanked: 1 time(s) in 1 post(s)
You cannot use INPUT in an Exploration or System Test.

You can use OPT in creative ways in the System Tester.

You might use the GV.DLL for Global Variables.
Users browsing this topic
Guest (Hidden)
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.