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

Notification

Icon
Error

Options
Go to last post Go to first unread
WaveTrader  
#1 Posted : Thursday, February 15, 2007 2:30:19 PM(UTC)
WaveTrader

Rank: Newbie

Groups: Registered, Registered Users, Subscribers
Joined: 2/8/2007(UTC)
Posts: 8
Location: Toronto, Ontario, Canada

Hello Group,

I've created several functions that use a common value in the "TroughBars" function - a number I've specified for the "%MinimumChange". I use a variable - *PMC:= 150; - that I reference in the "TroughBars" function to set the "%MinimumChange".

I'd like to be able to globally change this value in all the functions that use it by changing the number in just one function. I created a function that simply has the above expression* and tried to reference it in the other functions, but I get an error message stating, "This variable or expression must contain only constant data".

Is there some way around this so I can use one function to globally change the "%MininumChange" in all of the "Troughbars" functions I use in multiple functions?

Thanks,

Wave~Trader

smg  
#2 Posted : Thursday, February 15, 2007 7:16:27 PM(UTC)
smg

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers
Joined: 8/13/2005(UTC)
Posts: 90

Mr. Wave~Trader,

Please have a look at LastValue() function, it might help you. Use it where your function is being called.

Regards,

SMG

WaveTrader  
#3 Posted : Friday, February 16, 2007 7:23:22 AM(UTC)
WaveTrader

Rank: Newbie

Groups: Registered, Registered Users, Subscribers
Joined: 2/8/2007(UTC)
Posts: 8
Location: Toronto, Ontario, Canada

Thanks SMG,

Will check it out!

Regards,

Wave~Trader

WaveTrader  
#4 Posted : Friday, February 16, 2007 8:25:58 AM(UTC)
WaveTrader

Rank: Newbie

Groups: Registered, Registered Users, Subscribers
Joined: 2/8/2007(UTC)
Posts: 8
Location: Toronto, Ontario, Canada

Hello SMG,

I tried your suggestion to use the "LastValue()" function and it worked!

Thanks very much for your response.

Regards,

Wave~Trader

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.