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

Notification

Icon
Error

Options
Go to last post Go to first unread
alberto.tortella  
#1 Posted : Thursday, August 10, 2006 9:59:20 AM(UTC)
alberto.tortella

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers
Joined: 3/13/2006(UTC)
Posts: 53
Location: Verona - Italy

I wrote the following code in Sell Order tab in my System Tester.

I want to close my positions when the closing price is lower then the low price in the entry bar, but the system doesn't work as I want.

Is there a rule in order to close the position when the closing price is lower then the low price in the entry bar? Thank you.

range:= Ref(H-L,-1);
ENTRY1:= Ref(C,-1) + LinearReg(range,4)*1.5;
ENTRY2:= Cross(C,ENTRY1);

STOPLONG:= Ref(C,-1) - LinearReg(range,4)*1;

STOP:=
C<ValueWhen(1,ENTRY2,LOW)
AND
Ref(C,-1)>ValueWhen(1,ENTRY2,LOW);

EXIT:= STOP
OR
Cross(STOPLONG,C);

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.