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

Notification

Icon
Error

Options
Go to last post Go to first unread
Alessandro  
#1 Posted : Wednesday, April 3, 2013 1:21:21 AM(UTC)
Alessandro

Rank: Newbie

Groups: Registered, Registered Users, Unverified Users
Joined: 10/25/2012(UTC)
Posts: 7

Posted this message in the formula section but have had no responses so will try here among the elite.

I need some help in identifying which functions or formula to use for the following so if anyone can help I'd be obliged.

Identify a contiguous string of 2 or more events and then the occurence of a different event within a defined period, for example look for two or more closes below the BBandBot (setup) then wait for a close above an EMA (trigger) with a time limit of say 5 days from the setup.

henry1224  
#2 Posted : Wednesday, April 3, 2013 4:45:24 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)
Code:

Setup:=Sum(C<BBandBot(C,20,S,2),2)>1;
Trigger:=Cross(C,Mov(C,14,E));
(Alert(Setup,5) + Trigger) =2;


Alessandro  
#3 Posted : Wednesday, April 3, 2013 3:28:45 PM(UTC)
Alessandro

Rank: Newbie

Groups: Registered, Registered Users, Unverified Users
Joined: 10/25/2012(UTC)
Posts: 7

Thank you Henry, you've made it look so simple.

hbnmgr  
#4 Posted : Friday, May 10, 2013 9:07:54 AM(UTC)
hbnmgr

Rank: Member

Groups: Registered, Registered Users
Joined: 5/2/2012(UTC)
Posts: 14

The BBand part of your formula doesn't seem to work. The Trigger does however, everytime the close crosses the 14MA whether it is outside the BBand or not. So there's something missing ! ! !

Here is the Long Hand Version ....
SETUP - When Close is below the Bot BB 2 days ago and 3 days ago
TRIGGER - When Day or two after Setup Close crosses above X-dayMA.

Quote:

C<Ref(BBandBot(C,14,S,2)-2) AND C<Ref(BBandBot(C,14,S,2)-3) AND Cross(C,Mov(C,4,S))


How can we make it shorter?
Thanks!
HBNMGR

henry1224  
#5 Posted : Friday, May 10, 2013 8:04:48 PM(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)
dear HBNmgr, The formula that I provided works for the conditions that were stated, I tested it on a daily chart of UTX.

You are changing the parameters with smaller and faster indicators.

Code:


 
 
 


BBPer:=Input("BBands",5,100,21);

MAPer:=Input("MA",2,100,14);

LSetup:=Sum(C<BBandBot(C,BBPer,S,2),2)>1;

SSetup:=Sum(C>BBandTop(C,BBPer,S,2),2)>1;

LTrigger:=Cross(C,Mov(C,MAPer,E));

STrigger:=Cross(Mov(C,MAPer,E),C);

Long:=(Alert(LSetup,5) + LTrigger) =2;

Short:=(Alert(SSetup,5) + STrigger) =2;

Signal:=Long-Short;

Signal;
this is a long/ short version
Code:
Identify a contiguous string of 2 or more events and then the occurence
 of a different event within a defined period, for example look for two 
or more closes below the BBandBot (setup) then wait for a close above an
 EMA (trigger) with a time limit of say 5 days from the setup.
Two contiguous events will still remain valid if the next bar extends the contiguous event to three in a row !It will still remain an active setup, all it does is to push the alert back one bar

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.