Forex
Google
New signals service!

Go Back   Forex Trading > Discussion Areas > General Discussion


Register in Forex TSD!
Trading Systems Leaders in this forum (automated trading systems) are winning more than 3000 pips in a month (30000$ investing one lot every time).
Click here to register and get more information

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 06-24-2006, 11:34 PM
iscuba11's Avatar
Senior Member
 
Join Date: May 2006
Location: Houston
Posts: 400
iscuba11 is on a distinguished road
Question Statement clarification request!

This is a simple question. I am not well versed in MQ4 language.

How can I change a statement from:

if (OsMA Previous > OsMAPrevious 2) OsMADirection = 1

To: (OsMA Previous > OsMAPrevious 2) OsMADirection = Bullish ??

Is it as simple as putting quotations around Bullish. Your simple advice is appreciated.

Dave
<><<<
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 06-25-2006, 06:10 AM
Senior Member
 
Join Date: Jun 2006
Posts: 313
EACAN is on a distinguished road
Quote:
Originally Posted by iscuba11
This is a simple question. I am not well versed in MQ4 language.

How can I change a statement from:

if (OsMA Previous > OsMAPrevious 2) OsMADirection = 1

To: (OsMA Previous > OsMAPrevious 2) OsMADirection = Bullish ??

Is it as simple as putting quotations around Bullish. Your simple advice is appreciated.

Dave
<><<<
hi Dave if you are intending to use strings then OsmaDirection will also be a string .

string Bullish;
string Bearish;
string OsMADirection = "";
double OSMAPREVIOUS,OSMAPREVIOUS2;

-- your code.....


now you could say
if (OsMA Previous > OsMAPrevious 2) OsMADirection = Bullish;
else if(OSMA Previous < OsmaPrevious2) OsMADirection = Bearish;


Keep in mind OsMADirection is a string which means you can only use it with other string variables there are other ways to convert between variables but i think you are not asking for that.

regards
EACAN.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 06-25-2006, 06:20 AM
iscuba11's Avatar
Senior Member
 
Join Date: May 2006
Location: Houston
Posts: 400
iscuba11 is on a distinguished road
Smile

This may work for what I need. I will try to incorporate.

Thanks for responding!


Dave
<><<
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 06-25-2006, 06:35 AM
elihayun's Avatar
Senior Member
 
Join Date: Jan 2006
Posts: 350
elihayun is on a distinguished road
Quote:
Originally Posted by iscuba11
This is a simple question. I am not well versed in MQ4 language.

How can I change a statement from:

if (OsMA Previous > OsMAPrevious 2) OsMADirection = 1

To: (OsMA Previous > OsMAPrevious 2) OsMADirection = Bullish ??

Is it as simple as putting quotations around Bullish. Your simple advice is appreciated.

Dave
<><<<
If u don't want to change the entire program u can do the following

at the start of the program put the line

#define Bullish 1

and everytime instead of using 1 as bullish u can just write Bullish instead

Eli
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 06-25-2006, 07:28 PM
iscuba11's Avatar
Senior Member
 
Join Date: May 2006
Location: Houston
Posts: 400
iscuba11 is on a distinguished road
Smile

It worked!! Yaa Hoo! Have a blessed Sunday everybody!

Dave
<><<<
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Bookmarks

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 On
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Question on a statement - Need clarification iscuba11 General Discussion 2 08-31-2006 04:39 AM
EA using indicator data - Professional Clarification Required. iscuba11 Metatrader 4 3 08-26-2006 03:17 AM
Here is my TSD statement noegrahaz Post and compare Trades 8 10-06-2005 01:13 PM


All times are GMT. The time now is 11:05 PM.



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