Forex



Go Back   Forex Trading > Discussion Areas > Metatrader 4
Forex Forum Register More recent Blogs Calendar Advertising Others Help






Register
Welcome to Forex-TSD!, one of the largest Forex forums worldwide, where you will be able to find the most complete and reliable Forex information imaginable.

From the list below, select the forum that you want to visit and register to post, as many times you want. It’s absolutely free. Click here for registering on Forex-TSD.

Exclusive Forum
The Exclusive Forum is the only paid section. Once you subscribe, you will get free access to real cutting-edge Trading Systems (automated and not), Indicators, Signals, Articles, etc., that will help and guide you, in ways that you could only imagine, with your Forex trading.
  • Elite Section
    Get access to private discussions, specialized support, indicators and trading systems reported every week.
  • Advanced Elite Section
    For professional traders, trading system developers and any other member who may need to use and/or convert, the most cutting-edge exclusive indicators and trading systems for MT4 and MT5.
See more

Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old 03-23-2007, 02:17 PM
Junior Member
 
Join Date: Oct 2006
Posts: 28
Jagg is on a distinguished road
Only show smallest variable

Hi,

I have three variables (values of this variables are for example: 68, 25, 93). Now I will only show the smallest one of them in the indicator window.

How can I check this three variables so I get back the smallest one?

Thanks
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
  #2 (permalink)  
Old 03-23-2007, 03:18 PM
Senior Member
 
Join Date: Nov 2005
Posts: 168
mangman is on a distinguished road
for example: 3 variables are var1,var2 and var3 and additional variable called smallest.

if(var1<var2) smallest=var1;
else smallest=var2;

if (var3<smallest) smallest=var3;
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
  #3 (permalink)  
Old 03-23-2007, 04:04 PM
Junior Member
 
Join Date: Oct 2006
Posts: 28
Jagg is on a distinguished road
Ok, thought there is a small functionn out there for that....

Say it are five variables... how to it then?

Thanks
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
  #4 (permalink)  
Old 03-23-2007, 04:25 PM
Senior Member
 
Join Date: Mar 2006
Posts: 793
Maji is on a distinguished road
I think that is something that is missing from MT4's math routines.

You can use the MathMin(Var1, Var2) in a loop to do this. It sucks to do something complicated for something that simple. I with MT people provide us with a built in Highest and Lowest routine for any number. Currently, it can only do that for the OHLC type of values.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
  #5 (permalink)  
Old 03-24-2007, 01:24 AM
ralph.ronnquist's Avatar
Senior Member
 
Join Date: Oct 2006
Posts: 297
ralph.ronnquist is on a distinguished road
Quote:
Originally Posted by Jagg
Ok, thought there is a small functionn out there for that....

Say it are five variables... how to it then?

Thanks
The following snippet can be used for any fixed number of variables:
PHP Code:
double values[] = { var1var2, .., varN };
double min ArrayMinimumvalues ); 
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
  #6 (permalink)  
Old 04-03-2007, 09:56 AM
Junior Member
 
Join Date: Oct 2006
Posts: 28
Jagg is on a distinguished road
Quote:
Originally Posted by ralph.ronnquist
PHP Code:
double values[] = { var1var2, .., varN };
double min ArrayMinimumvalues ); 
Ok, I have PDiff, S1Diff, ... variables (double). Now I tried:
PHP Code:
double values[] = { PDiffS1DiffS2DiffR1DiffR2Diff };
double min ArrayMinimumvalues ); 
but get
Code:
'}' - comma or semicolon expected
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Show Us Your Best EA hellkas Expert Advisors - Metatrader 4 1881 11-18-2009 09:44 AM
EA doesnt show symbols soundchild Setup Questions 7 05-03-2009 09:06 AM
How do you show buy and sell arrows on an EA rbowles Metatrader 4 1 07-31-2006 01:04 AM
MT4 demos wont show history don perry Expert Advisors - Metatrader 4 2 07-27-2006 12:15 AM


All times are GMT. The time now is 03:42 PM.



Search Engine Friendly URLs by vBSEO 3.2.0 ©2008, Crawlability, Inc.