Rank: Member
Groups: Registered, Registered Users, Subscribers Joined: 9/26/2005(UTC) Posts: 11 Location: Houston
|
Hello,
I am trying to make an expert using Stochastic settings of 21,14,14. It must have all 3 settings not just the first two. I want to make it signal a buy when this crosses back up through the Stoch level of 20. Is this possible?
Thank you,
Steven
|
|
|
|
Rank: Advanced Member
Groups: Registered, Registered Users, Subscribers, Unverified Users Joined: 10/28/2004(UTC) Posts: 3,111 Location: Perth, Western Australia
Was thanked: 16 time(s) in 16 post(s)
|
Steven, Try this: Code:
x:=stoch(21,14);
y:=Mov(x,14)>20;
signal:=y and Alert(y=0,2);
signal;
Hope this helps. wabbit [:D]
|
|
|
|
Rank: Member
Groups: Registered, Registered Users, Subscribers Joined: 9/26/2005(UTC) Posts: 11 Location: Houston
|
This is great. Thank you. Can you tell me what Alert(y=0,2) means?
|
|
|
|
Rank: Advanced Member
Groups: Registered, Registered Users, Subscribers, Unverified Users Joined: 10/28/2004(UTC) Posts: 3,111 Location: Perth, Western Australia
Was thanked: 16 time(s) in 16 post(s)
|
The entire code:
y AND Alert(y=0,2)
is a more controlled and more robust method instead of the Cross() function which can sometimes suffer a few problems.
Basically we are looking for the condition where today 'y' is true (y, is the same as y=TRUE, is the same as y=1) and within the last 2 days, 'y' must have been false. If 'y' is true today then looking only at the last two bars, then 'y' must have been false on the previous bar.
If you need more explanation, just ask.
wabbit [:D]
|
|
|
|
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.