Forex



Go Back   Forex Trading > Discussion Areas > Setup Questions
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 10-30-2006, 07:16 PM
Diam0nd's Avatar
Senior Member
 
Join Date: Oct 2006
Posts: 235
Diam0nd is on a distinguished road
Question 'extern double Lots' question

To start off, I am a beginner MQL programmer. Now, here goes a beginner question.

I have a variable defined in my EA:
Code:
extern double Lots = 0.1;
However, when the EA trades, it uses 1.0 lots, even though the 0.1 is set under variable above. Could anyone please be so kind to explain me how do I make sure that EA uses the lot size I set in the variable? Is there any special code I need to add to my expert?



Thanks in advance,
Diam0nd.
__________________
- MetaTrader v4.00 Build 225 (10 Jul 2008)
- MetaTrader MultiTerminal v4.00 Build 213 (20 Mar 2008)
- Always use the latest (^ABOVE^) MetaQuotes products, saves a lot of nerves. What's new.
"METAQUOTES FOR LIFE!"
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 10-30-2006, 08:25 PM
raff1410's Avatar
Senior Member
 
Join Date: May 2006
Location: 24°10' E 54°24' N
Posts: 201
raff1410 is on a distinguished road
Try to find and modify all "OrderSend" functions in EA... Add "Lots" variable...

OrderSend(Symbol(),OP_BUY,Lots,Ask,3,Ask-25*Point,Ask+25*Point,"My order #2",16384,0,Green);

Quote:
Originally Posted by Diam0nd
To start off, I am a beginner MQL programmer. Now, here goes a beginner question.

I have a variable defined in my EA:
Code:
extern double Lots = 0.1;
However, when the EA trades, it uses 1.0 lots, even though the 0.1 is set under variable above. Could anyone please be so kind to explain me how do I make sure that EA uses the lot size I set in the variable? Is there any special code I need to add to my expert?



Thanks in advance,
Diam0nd.
__________________
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 11-02-2006, 12:30 PM
Diam0nd's Avatar
Senior Member
 
Join Date: Oct 2006
Posts: 235
Diam0nd is on a distinguished road
Smile

Quote:
Originally Posted by raff1410
Try to find and modify all "OrderSend" functions in EA... Add "Lots" variable...

OrderSend(Symbol(),OP_BUY,Lots,Ask,3,Ask-25*Point,Ask+25*Point,"My order #2",16384,0,Green);
Superb! Thanks so much for the info
__________________
- MetaTrader v4.00 Build 225 (10 Jul 2008)
- MetaTrader MultiTerminal v4.00 Build 213 (20 Mar 2008)
- Always use the latest (^ABOVE^) MetaQuotes products, saves a lot of nerves. What's new.
"METAQUOTES FOR LIFE!"
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
How do I check for a double top or double bottom iscuba11 Metatrader 4 5 03-31-2009 03:15 PM
double exponencial greenmouse General Discussion 8 06-13-2007 11:51 PM
Lots of $$ and lots of potential... dukeofdents Suggestions for Trading Systems 5 04-08-2007 03:19 AM
can i extern a selectable variable? winnysunny General Discussion 1 04-19-2006 02:49 AM
Double CCI crossover Thruline Indicators - Metatrader 4 1 12-14-2005 09:22 AM


All times are GMT. The time now is 02:58 AM.



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