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

Notification

Icon
Error

Options
Go to last post Go to first unread
omp7989  
#1 Posted : Thursday, December 24, 2009 11:49:11 PM(UTC)
omp7989

Rank: Newbie

Groups: Registered, Registered Users
Joined: 12/24/2009(UTC)
Posts: 3

Hi Friends & Seniors, I am new to this forum and also new to The World of Technical Analysis,

I need your help please as below,

By using Indicator Builder,

I have 3 moving averages,

1. mov(c,3,e)
2. mov(c,13,e)
3. mov(c,39,e)

I want to plot mov(c,39,e) on chart only when mov(c,3,e) is greater than mov(c,13,e) otherwise nothing else,

For doing this when I am using the formula " IF( MOV(C,3,E) > MOV(C,13,E), MOV(C,39,E), 0) " there is mov(c,39,e) on chart and also 0 line on chart too and that is my problem,

I dont want the 0 line on chart when mov(c,3,e)<mov(c,13,e),

I want to plot mov(c,39,e) on chart only when mov(c,3,e) is greater than mov(c,13,e) otherwise nothing else,

Please help me to built this formula,

Thanking you in advance,

OmPrakash
( omp7989@yahoo.com )


johnl  
#2 Posted : Friday, December 25, 2009 7:50:39 PM(UTC)
johnl

Rank: Advanced Member

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

Lines like that have to be continuous I believe. I usually drop the line say 15% below close
instead of zero so the line is sort of out of the way.

oztrader  
#3 Posted : Saturday, December 26, 2009 12:54:23 AM(UTC)
oztrader

Rank: Advanced Member

Groups: Registered, Registered Users, Unverified Users
Joined: 7/12/2007(UTC)
Posts: 134
Location: Perth Western Australia

On the basis of the comment made by johnl you effectively need to hide the indicator when the condition Mov(C,3,E) > Mov(C,13,E) is false.

To achieve this you will need to do the following:-

    1. Create a new indicator
      {New Indicator}
      If(Mov(C,3,E)>Mov(C,13,E),0,Mov(C,39,E));
    2. Attach a 39 period exponential moving average to the chart
    3. Inset the "new indicator" to the chart in the same inner window as you attached the EMA and change the colour of this indicator to the same as the background colour (default = white).
    4. Save as a template for future reference.


Although it is a work-around the visual effect is achieved.

omp7989  
#4 Posted : Saturday, December 26, 2009 4:36:57 AM(UTC)
omp7989

Rank: Newbie

Groups: Registered, Registered Users
Joined: 12/24/2009(UTC)
Posts: 3

Thank you very much for reply,
But 0 line is still my problem,
Due to 0 line ploted on chart,
y-axis or x-axis starts from 0 & chart becomes too small,

My problem is still there,

Thanx again for reply

OmPrakash
(omp7989@yahoo.com)
oztrader  
#5 Posted : Saturday, December 26, 2009 5:27:12 AM(UTC)
oztrader

Rank: Advanced Member

Groups: Registered, Registered Users, Unverified Users
Joined: 7/12/2007(UTC)
Posts: 134
Location: Perth Western Australia

Perhaps you should make an effort to understand the code so you can learn something from this exercise.

Try changing the "New Indicator" to

If(Mov(C,3,E)>Mov(C,13,E),L*0.90,Mov(C,39,E));

Note how this changes your scaling to help overcome this problem.

mstt  
#6 Posted : Saturday, December 26, 2009 9:25:31 PM(UTC)
mstt

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers
Joined: 7/25/2005(UTC)
Posts: 1,042

Was thanked: 57 time(s) in 54 post(s)

Hi OMP

The scaling problem is easily overcome if you don't mind making a couple of compromises elswhere. Firstly, use the dotted line style for any plots that switch between MA and zero. Secondly, add an N/A producing output AFTER the MA/zero outputs. Something like "ValueWhen(1,0,0)" will do nicely. The N/A output effectively disconnects the the zero portions of the MA plots from the scale being used while leaving the MA portion of those plots still linked to the price plot.

The use of dotted lines allows the switch from zero to MA value (and vice versa) to be blanked, but the downside is that you only get one dot per price bar. And when using an N/A plot as the last output you no longer have the ability to read off that indicator's values in the data window - this may or may not be a problem for you. Since this is a little messy to set up you might want to do it once and then save into your default template.

Roy

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.