Forex
Google
New signals service!

Go Back   Forex Trading > Metatrader Training > Metatrader 4 mql 4 - Development course > Questions


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 (2) Thread Tools Display Modes
  #1281 (permalink)  
Old 08-26-2008, 11:48 AM
JBear's Avatar
Member
 
Join Date: Aug 2008
Location: Adelaide South Australia
Posts: 45
JBear is on a distinguished road
Quote:
Originally Posted by Linuxser View Post
Hi JBear,

Just remember to click on "Remember me" with every browser (Firefox, Opera, Explorer, Safari...) and do not higly restric cookies.
Thanks Linuxser.

Done
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #1282 (permalink)  
Old 08-26-2008, 04:00 PM
Junior Member
 
Join Date: Apr 2006
Posts: 3
eddieee2000 is on a distinguished road
Batch order?

Can anyone help me code a "batch order"? I would like to have something that allows me to enter two seperate positions with the click of a button. I typically trade in hedged positions. I have several different pairs I trade at different times. All I would like to have is an EA that the moment I turn it on, it will (for example) enter me into a 1 lot long on the EURUSD and 1 lot short on the GBPUSD. Can anyone help assist me with this code? It would sure be much nicer to simply hit one button rather than to open one chart click new order, click buy and then race to open the next chart hit new order and sell it.
Thanks,
EZ
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #1283 (permalink)  
Old 08-28-2008, 02:39 PM
Junior Member
 
Join Date: Mar 2007
Posts: 6
pgtips is on a distinguished road
batch order

Hi,
i'm no coder but I think if I wanted to do this I would look at it slightly differently. have one EA to place one order, buy or sell which you put on charts then when you turn EA on in metatrader it will execute EAs and place the orders based on which charts you have placed EA on.

This way you have multiple instant order placed on several currency charts

Problem is though deciding which you want, buy or sell but it may help you until something better comes up.

PG
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #1284 (permalink)  
Old 09-02-2008, 12:42 PM
Junior Member
 
Join Date: Jan 2008
Posts: 14
forexarchitect is on a distinguished road
and or

hello guys
I have a question here... how do I change the following;

extern double MaxLot = 1.50;

double max_lot = GetMaxLot(OP_BUY, OP_SELL);
if (max_lot >= MaxLot) lot = CalcHedgeLot(order_type);
(order_type)]: ", lot);


if (lot == -1) return (lot);

lot = NormalizeDouble(lot, LotPrec);
if (lot > MaxLot) lot = MaxLot;
if (lot < MinLot) lot = MinLot;

return (lot);
}


the above check for OP_BUY AND OP_SELL

question: how do I change it to any OP_BUY OR any OP_SELL

appreciate
__________________
creativity + common sense + a bit of humor = lots of pipp

Last edited by forexarchitect; 09-02-2008 at 03:19 PM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #1285 (permalink)  
Old 09-02-2008, 10:32 PM
Sadly's Avatar
Senior Member
 
Join Date: Nov 2006
Posts: 260
Sadly is on a distinguished road
Can anyone tell me what the MQL4 code is for counting only the visable bars is?

I seem to remember sometime ago that someone posted the code for it but I can't find it anywhere when I search as I'm ever so slightly hampered by what to look for exactly. Off the top of my head I seem to recall it was something like ...

.... int counted_bars = window() or int window() = Bars-window()

But then again, the old gray matter ain't what it used to be ...
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #1286 (permalink)  
Old 09-03-2008, 12:11 AM
Goen's Avatar
Member
 
Join Date: Apr 2007
Posts: 64
Goen is on a distinguished road
Quote:
Originally Posted by Sadly View Post
Can anyone tell me what the MQL4 code is for counting only the visable bars is?

I seem to remember sometime ago that someone posted the code for it but I can't find it anywhere when I search as I'm ever so slightly hampered by what to look for exactly. Off the top of my head I seem to recall it was something like ...

.... int counted_bars = window() or int window() = Bars-window()

But then again, the old gray matter ain't what it used to be ...
Is this what you looking for ?
-----------
int bars_count=WindowBarsPerChart();
int bar=WindowFirstVisibleBar();
-----------

Goen

Last edited by Goen; 09-03-2008 at 12:13 AM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #1287 (permalink)  
Old 09-03-2008, 12:21 AM
Goen's Avatar
Member
 
Join Date: Apr 2007
Posts: 64
Goen is on a distinguished road
Quote:
Originally Posted by forexarchitect View Post
hello guys
I have a question here... how do I change the following;

extern double MaxLot = 1.50;

double max_lot = GetMaxLot(OP_BUY, OP_SELL);
if (max_lot >= MaxLot) lot = CalcHedgeLot(order_type);
(order_type)]: ", lot);


if (lot == -1) return (lot);

lot = NormalizeDouble(lot, LotPrec);
if (lot > MaxLot) lot = MaxLot;
if (lot < MinLot) lot = MinLot;

return (lot);
}


the above check for OP_BUY AND OP_SELL

question: how do I change it to any OP_BUY OR any OP_SELL

appreciate
You must modify the GetMaxLot() function code, or maybe you can use GetMaxLot(OP_BUY, OP_BUY); and GetMaxLot(OP_SELL, OP_SELL); (depends on the code - can do like that or not).
But I guess it worth to try

Goen
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #1288 (permalink)  
Old 09-03-2008, 12:40 AM
Sadly's Avatar
Senior Member
 
Join Date: Nov 2006
Posts: 260
Sadly is on a distinguished road
Quote:
Originally Posted by Goen View Post
Is this what you looking for ?
-----------
int bars_count=WindowBarsPerChart();
int bar=WindowFirstVisibleBar();
-----------

Goen
Thank you, Goen .
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #1289 (permalink)  
Old 09-03-2008, 06:03 AM
Junior Member
 
Join Date: Jan 2008
Posts: 14
forexarchitect is on a distinguished road
Quote:
Originally Posted by Goen View Post
You must modify the GetMaxLot() function code, or maybe you can use GetMaxLot(OP_BUY, OP_BUY); and GetMaxLot(OP_SELL, OP_SELL); (depends on the code - can do like that or not).
But I guess it worth to try

Goen
thanks for answering..

what do I need to change here? appreciate your help

double GetMaxLot(int type1, int type2)
{
double max_lot = 0.0;

int cnt = OrdersTotal();
for (int i=0; i < cnt; i++)
{
if (!OrderSelect(i, SELECT_BY_POS, MODE_TRADES)) continue;
if (OrderSymbol() != Symbol()) continue;
if (OrderMagicNumber() != Magic) continue;
if (OrderType() != type1 && OrderType() != type2) continue;

if (max_lot == 0 || OrderLots() >= max_lot)
{
max_lot = OrderLots();
}
}

return (max_lot);
}
__________________
creativity + common sense + a bit of humor = lots of pipp
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #1290 (permalink)  
Old 09-03-2008, 06:05 AM
Junior Member
 
Join Date: Jan 2008
Posts: 14
forexarchitect is on a distinguished road
a bit in a loss here...
__________________
creativity + common sense + a bit of humor = lots of pipp

Last edited by forexarchitect; 09-03-2008 at 06:07 AM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Bookmarks

Tags
histogram, forex, ZUP_v1.mq4

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

LinkBacks (?)
LinkBack to this Thread: http://www.forex-tsd.com/questions/270-ask.html
Posted By For Type Date
OzFx System:) - Page 639 This thread Refback 06-21-2008 10:53 PM
Forex SRDC Sidus Sibkis EA MT4 Forum OTCSmart This thread Refback 12-08-2007 12:46 PM


All times are GMT. The time now is 06:12 AM.



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