Rank: Advanced Member
Groups: Registered, Registered Users, Unverified Users Joined: 1/13/2005(UTC) Posts: 87 Location: perth australia
|
Hi all,
It seems simple enough to me but I can't seem to construct the formula.
What I want is to generate an entry signal after another signal has been generated earlier.
My criteria for entry are C >mov(c,20,s) and adx(13) > 25 only after a previous signal has been generated.
Is this possible?
Rua
|
|
|
|
Rank: Advanced Member
Groups: Registered, Registered Users, Subscribers Joined: 9/8/2004(UTC) Posts: 2,266
Was thanked: 1 time(s) in 1 post(s)
|
What about something like that :
Condition1:={Your previous condition here};
Condition2:=C>mov(c,20,s) and adx(13)>25;
Condition2 and barssince(ref(Condition2),-1)>Barssince(Ref(Condition1,-1))
|
|
|
|
Rank: Advanced Member
Groups: Registered, Registered Users, Unverified Users Joined: 1/13/2005(UTC) Posts: 87 Location: perth australia
|
Hi Patrick,
Many thanks for that!!!
Rua
|
|
|
|
Rank: Advanced Member
Groups: Registered, Registered Users, Unverified Users Joined: 1/13/2005(UTC) Posts: 87 Location: perth australia
|
Thanks for that! I fiddled with condition 2 thus:
Condition1:={my first signal};
Condition2:= ADX(13)>25 AND Mov(C,20,S) > Mov(C,150,W) and c > Mov(C,20,S) and c > Mov(C,150,w);
Condition2 AND BarsSince(Ref(Condition2,-1))>BarsSince(Ref(Condition1,-1))
I now find that it does not generate the second condition properly. What am I doing wrong here?
Rua
|
|
|
|
Rank: Advanced Member
Groups: Registered, Registered Users, Subscribers Joined: 9/8/2004(UTC) Posts: 2,266
Was thanked: 1 time(s) in 1 post(s)
|
I would have to see what your first signal is, but I'm guessing the problem might be that your condition is true quite often.
For example your second condition is only using > so the signal might keep repeating itself.
You need to find one condition or write one condition so that it is true only once.
If we take C>Mov(C,50,E) It would be true as soon as C cross above the average, I would rewrite this like : Cross(C,Mov(C,50,E)) so that the condition is only true the first time C is greater the average
|
|
|
|
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.