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

Notification

Icon
Error

Options
Go to last post Go to first unread
stevens4x  
#1 Posted : Monday, August 28, 2006 6:02:08 PM(UTC)
stevens4x

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

wabbit  
#2 Posted : Monday, August 28, 2006 6:05:30 PM(UTC)
wabbit

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]
stevens4x  
#3 Posted : Monday, August 28, 2006 6:15:15 PM(UTC)
stevens4x

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?
wabbit  
#4 Posted : Thursday, August 31, 2006 12:24:24 AM(UTC)
wabbit

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.