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

Notification

Icon
Error

Options
Go to last post Go to first unread
fredcom3  
#1 Posted : Saturday, February 17, 2007 7:36:31 AM(UTC)
fredcom3

Rank: Newbie

Groups: Registered, Registered Users
Joined: 9/13/2006(UTC)
Posts: 2

Hi,

I'm really sorry if my question has been already asked...

So, I'd like to have the value of an indicator, or a variable, to be conditional!

For example, the condition should be: dayofmonth()<>ref(dayofmonth(),-) or something like C>5, and the value of the indicator will only be present if the condition is true.

I don't want to have any value (like 0) if the condition is not true.

Is it possible with Metastock

Thanks

wabbit  
#2 Posted : Saturday, February 17, 2007 12:54:53 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)
Unfortunately, once MS starts assigning values to an indicator, those values must exist either as a 'true' value or zero.

It is possible for example to create an indicator that can return NA values for say the first 50 bars on the chart and the last 50 bars on the chart, but all the bars in between MUST have a value; any value or zero.

There are a couple of techniques using the indicator formatting to hide the unwanted data, but these can sometimes lead to problems on charts of any penny-dreadfuls. You can try this yourself by changing the indicator line type to points and the size to say, 4 and then set the minimum y-scale value to a value so that you cannot see the zero values. You should now be left with a chart where the conditional indicator values are shown, but the zero values are hidden below the bottom of the chart area.

You can do another trick using another line constantly set at zero, plot this line after the conditional indicator and make this line invisible. It will overwrite the conditiional line making it too invisible.

If you need any more help, just ask.

Hope this helps.

wabbit [:D]

Jose  
#3 Posted : Saturday, February 17, 2007 9:27:38 PM(UTC)
Jose

Rank: Advanced Member

Groups: Registered, Registered Users
Joined: 1/19/2005(UTC)
Posts: 1,065
Location: Koh Pha-Ngan, Earth

Was thanked: 2 time(s) in 2 post(s)
"too invisible"? :-D Is there a less severe version, such as half-invisible? :) jose '-)
fredcom3  
#4 Posted : Sunday, February 18, 2007 7:36:29 AM(UTC)
fredcom3

Rank: Newbie

Groups: Registered, Registered Users
Joined: 9/13/2006(UTC)
Posts: 2

Thanks for your help Wabbit,

Do you think it's possible to "export" those conditional value, and then "import" it after.

Something like that:

extfml("ExportIt",condition, destination_file,value);
Myvalue:=extfml("ImportIt",destination_file);
mov(Myvalue,10,s) {or whatever I want}

wabbit  
#5 Posted : Wednesday, February 21, 2007 11:33:05 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)
fredcom3

You could, but why would you want to? The way MS works this would do nothing except use up valuable disk space and processor time. It would have the same result as:

x:=1;
y:=x;

Obviously, I am still at a loss about exactly what you are trying to achieve. Perhaps you coule provide a more thorough explanation of what it is you are trying to do and maybe all your code; we might have better ways to achieve your aim once we know where we are going!

If you want to discuss this matter offline, feel free to contact me by other means.


wabbit [:D]


fredcom_  
#6 Posted : Friday, February 23, 2007 3:46:37 AM(UTC)
fredcom_

Rank: Newbie

Groups: Registered, Registered Users
Joined: 2/23/2007(UTC)
Posts: 7
Location: FRANCE

Thanks for your attention wabitt.

Imagine that I've a 1minute chart datas and I want the bollingerTop on a 60minutes periodicity in the same chart...

I can write an indicator to have the Close every Minute()=00, but it's not a way to obtain the value of a BollingerTop on a 60minutes basis, because there is information(value) at Time 01, 02,...

For example:

x:=if(Minute()=0,C,0);

boll:=bbandtop(x,20,2); {didn't give me a bbandtop in a 60minutes basis}

I think I've found a solution.
Please, if you have time, have a look at this discussion : http://forum.equis.com/forums/23072/ShowThread.aspx#23072

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.