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

Notification

Icon
Error

Options
Go to last post Go to first unread
ferrdav  
#1 Posted : Sunday, August 28, 2005 9:53:46 PM(UTC)
ferrdav

Rank: Newbie

Groups: Registered, Registered Users
Joined: 8/22/2005(UTC)
Posts: 8
Location: ITALY

Hi guys, i have this Expert code i'd like to improve with the following: 1) when long ( condition mov(h,3,e)>mov(h,30,e) ), if C is less than the max close in the past N bars (periods)) then exit long. 2) when short ( condition mov(l,3,e)<mov(l,30,e) ),if C is greater than the min close in the past N bars (periods)) then exit short. I cannot have the whole condition... How should i modify this if((1+VAR1)*mov(h,3,e)>mov(h,30,e),LE>SE,0) to get 1)? Please could someone help? ENTRY LONG B:=MOV(Ref(1.02*LLV(L,42),0),3,e); A1:=MOV(Ref(0.98*HHV(H,42),0),3,e); mi:=(A1+B)/2; LE:=C>=Mi; SE:=C<mi; VAR1:=0.15*STDEV(C,10); if((1+VAR1)*mov(h,3,e)>mov(h,30,e),LE>SE,0) ENTRY SHORT B:=MOV(Ref(1.02*LLV(L,42),0),3,e); A1:=MOV(Ref(0.98*HHV(H,42),0),3,e); mi:=(A1+B)/2; LE:=C>=Mi; SE:=C<mi; VAR1:=0.15*STDEV(C,10); if((1+VAR1)*mov(L,3,e)<mov(L,30,e),LE<SE,0) P.S. This script seem to work well. I backtested it on italian eod data on different time periods. think it's fine. If anyone would like to it and post here what he thinks is welcome. Any improvement, new ideas, are welcome...
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.