Rank: Advanced Member
Groups: Registered, Registered Users Joined: 3/30/2009(UTC) Posts: 46 Location: Hawaii, US
|
aa:=if(c-ref(c,-1)>0,1,0); bb:=if(ref(c,-1)-ref(c,-2)>0,1,0); cc:=if(ref(c,-2)-ref(c,-3)>0,1,0); dd:=if(ref(c,-3)-ref(c,-4)>0,1,0); ee:=if(ref(c,-4)-ref(c,-5)>0,1,0); ff:=if(ref(c,-5)-ref(c,-6)>0,1,0); gg:=if(ref(c,-6)-ref(c,-7)>0,1,0); hh:=if(ref(c,-7)-ref(c,-8)>0,1,0); ii:=if(ref(c,-8)-ref(c,-9)>0,1,0); jj:=if(ref(c,-9)-ref(c,-10)>0,1,0); kk:=if(ref(c,-10)-ref(c,-11)>0,1,0); ll:=if(ref(c,-11)-ref(c,-12)>0,1,0); if((aa+bb+cc+dd+ee+ff+gg+hh+ii+jj+kk+ll)/12<opt1,1,0)
The above (long entry) test is running on my system, with 3 more optimizations for exit, short, buy to cover, and one for a trail stop. Total opts is 32k, and it ran overnight completing only 25% of the test. The attempt is to trade based on # of days up in the last 12, any help appreciated on code correctly identifying the condition, or to speed me uup!
|