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

Notification

Icon
Error

Options
Go to last post Go to first unread
organon1973  
#1 Posted : Friday, July 20, 2012 5:37:44 AM(UTC)
organon1973

Rank: Newbie

Groups: Registered, Registered Users
Joined: 7/13/2012(UTC)
Posts: 4

Is there a way of putting an arrow (up/down) below/above the bar on which a 2/5 EMA crossover occurs?
jjstein  
#2 Posted : Friday, July 20, 2012 6:09:07 AM(UTC)
jjstein

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers
Joined: 5/13/2005(UTC)
Posts: 715
Location: Midwest, USA

Was thanked: 1 time(s) in 1 post(s)
Create & attach an Expert; put the code in the SYMBOLS tab. For each condition, create a new entry, choose the arrow you want and whether it should be above or below.
organon1973  
#3 Posted : Friday, July 20, 2012 8:14:04 AM(UTC)
organon1973

Rank: Newbie

Groups: Registered, Registered Users
Joined: 7/13/2012(UTC)
Posts: 4

Thanks, John. A question: is there a way of telling the program to do nothing, if a condition is not met? Specifically: If(Mov(C,50,E)>Mov(C,100,E),Cross(Mov(CLOSE, 2,E),Mov(CLOSE,5,E)),-do nothing-) Translated as: If the 50 period EMA is greater than the 100 period EMA, indicate crossovers of the 2 EMA and the 5 EMA, else: do nothing.
jjstein  
#4 Posted : Friday, July 20, 2012 11:30:56 AM(UTC)
jjstein

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers
Joined: 5/13/2005(UTC)
Posts: 715
Location: Midwest, USA

Was thanked: 1 time(s) in 1 post(s)
organon1973 wrote:
Thanks, John. A question: is there a way of telling the program to do nothing, if a condition is not met?


Sure -- just add another condition, using AND. So, your code changes from:
Code:

If(Mov(C,50,E)>Mov(C,100,E),Cross(Mov(CLOSE, 2,E),Mov(CLOSE,5,E)),-do
 nothing-)


to
Code:

Mov(C,50,E)>Mov(C,100,E)
AND Cross(Mov(CLOSE,2,E),Mov(CLOSE,5,E));


FUTURE NOTE: When posting actual code, use the "tags" which you'll find below. It puts the code in a special box -- otherwise, it can get messed up by the forum software.
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.