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

Notification

Icon
Error

Options
Go to last post Go to first unread
bradulrich  
#1 Posted : Sunday, February 12, 2006 2:14:20 AM(UTC)
bradulrich

Rank: Advanced Member

Groups: Registered, Registered Users
Joined: 6/5/2005(UTC)
Posts: 35

I am trying to capture the code for a generic limit order within the framework of the Forum.Latch function... Does anyone have any comments on this method? It is just a first stab. [code:1:23753bb931] pr := MP(); alphas := .07; rangePct := 0.35; revPct := 1.015; itrend := ExtFml("ADSI.ITrend", pr, alphas); trigger := 2 * itrend - Ref(itrend, -2); LE:=itrend>trigger; SE:=itrend<trigger; LX:=0; SX:=0; { only when it has switched } {LE := LE = 1 AND Ref(LE,-1) <> 1;} { I don't think we need this } { if we would have bought outright yesterday, see if we hit our limit order for today I take a limit order to mean that if the market EVER drops to that price or below, then a buy signal is generated. I represented by this by the LOW, b/c if the LOW goes below then we know that at some point between the bars, the price dropped to or below the buy limit. } B:= ExtFml("Forum.Latch",LE,LX,SE,SX); B; LE := If(Ref(LE,-1), If(L <= Ref(CLOSE,-1) - rangePct*(Ref(H,-1)-Ref(L,-1)),1,0),0); B:= ExtFml("Forum.Latch",LE,LX,SE,SX); 5 + B; [/code:1:23753bb931] Thanks, Brad Ulrich
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.