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

Notification

Icon
Error

Options
Go to last post Go to first unread
zombie  
#1 Posted : Tuesday, December 7, 2010 11:37:02 PM(UTC)
zombie

Rank: Newbie

Groups: Registered, Registered Users, Subscribers
Joined: 12/7/2010(UTC)
Posts: 6

Hello kind hearts!! Please help me with coding for an exploration that can be run on all time frames with the following conditionalities: (all based on closing prices) 1) Buy Signal conditions: a) The market has been in a down trend i.e. making lower peaks and troughs b) Trend change - a higher trough is formed c) Generate Buy signal - after formation of the first higher trough as soon as the prior peak is crossed on closing basis. 2) Sell Signal conditions: a) The market has been in uptrend i.e making higher peaks and troughs b) Trend change - a lower trough i formed c) Generate Sell Signal - after the formation of the first lower peak as soon as the prior trough is vioalted on closing basis. In other words - a simple buy/sell signal alert based on Dow Theory that can be run on exploration in all time frames - daily, weekly & monthy. Thanks in advance for your kindness, time and efforts!!!
johnl  
#2 Posted : Wednesday, December 8, 2010 7:34:45 PM(UTC)
johnl

Rank: Advanced Member

Groups: Registered, Registered Users
Joined: 11/7/2005(UTC)
Posts: 602

Try something like:

p1:=Peak(1,C,5);
p2:=Peak(2,C,5);
p3:=Peak(3,C,5);
p4:=Peak(4,C,5);
t1:=Trough(1,C,5);
t2:=Trough(2,C,5);
t3:=Trough(3,C,5);
t4:=Trough(4,C,5);
{----------------------------}
a1:=(t4>t3)*(t3>t2)*(t2<t1);
a2:=(p3>p2)*(p1<p2);
a3:=Cross(C,p1);
a4:=a3*a1*a2;
a4
zombie  
#3 Posted : Thursday, December 9, 2010 12:53:56 AM(UTC)
zombie

Rank: Newbie

Groups: Registered, Registered Users, Subscribers
Joined: 12/7/2010(UTC)
Posts: 6

Hi John, Thanks once again. How do I use it.......?? I pasted this in explorer filter column and tried with minimum 100 records loaded with 1300 securities and tried it on daily, weekly and monthly. The results show 100% normal filter rejection in all the trials. Am I doing some thing wrong? thanks!!
Mark17  
#4 Posted : Thursday, December 9, 2010 6:04:28 AM(UTC)
Mark17

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers
Joined: 5/25/2010(UTC)
Posts: 55

[comment withdrawn]
henry1224  
#5 Posted : Thursday, December 9, 2010 6:24:10 AM(UTC)
henry1224

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers
Joined: 10/29/2004(UTC)
Posts: 1,394
Location: Glastonbury, CT

Was thanked: 2 time(s) in 2 post(s)
The use of Peak,Trough, and Zig functions are dynamic and are subject to change.They should only be used to establish support and resistance levels and not for signal generation
johnl  
#6 Posted : Thursday, December 9, 2010 6:52:50 PM(UTC)
johnl

Rank: Advanced Member

Groups: Registered, Registered Users
Joined: 11/7/2005(UTC)
Posts: 602

What Henry1224 is talking about is that the Peak and Trough 1 and 2 values will change
based on new prices. Signals will seem to appear and disappear out of nowhere. You will need another signal to verify. I wrote the above as a indicator so plot and scroll through
stocks to see if the signal logic is worth chasing after.

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.