Rank: Advanced Member
Groups: Registered, Registered Users Joined: 1/19/2006(UTC) Posts: 33
|
Simple question for someone, I'm sure.
If I have an exploration that I am using for a currency, and say I have a buy signal fomula of
Cross(mov(C,10,E),mov(C,40,E)) .
how do I tell it I want to sell when I hit 40 pips or
Cross(mov(C,40,E),mov(C,10,E)) ?
|
|
|
|
Rank: Advanced Member
Groups: Registered, Registered Users Joined: 4/27/2005(UTC) Posts: 130
|
Sorry jer99,
Its late I missed something please try this formula.
---8<----------------------------------
{Latch Design by Roy Larsen's of MetaStock Tips & Tricks}
pds:=40;
pips:=If(Int(Ref(O,-1))>=10,1.00,.0100);
X:=(pips*pds);
Long:=mov(C,10,E)>mov(C,40,E) AND Alert(mov(C,10,E)<mov(C,40,E),2);
V1:=ValueWhen(1,BarsSince(Long=1)=0,CLOSE);
xLong:=mov(C,10,E)<mov(C,40,E) AND Alert(mov(C,10,E)>mov(C,40,E),2) OR
C>(X+V1);
I:=Cum(Long+xLong>-1)=1;
Buy:=BarsSince(I OR Long)<BarsSince(I OR xLong);
Buy;
---8<----------------------------------
|
|
|
|
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.