| New signals service! | |
|
|||||||
| 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 |
|
![]() |
|
|
LinkBack (2) | Thread Tools | Display Modes |
|
|||
|
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 |
|
|||
|
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 |
|
|||
|
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. |
|
||||
|
Quote:
----------- int bars_count=WindowBarsPerChart(); int bar=WindowFirstVisibleBar(); ----------- Goen Last edited by Goen; 09-03-2008 at 12:13 AM. |
|
||||
|
Quote:
But I guess it worth to try ![]() Goen |
|
|||
|
Quote:
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 |
![]() |
| Bookmarks |
| Tags |
| histogram, forex, ZUP_v1.mq4 |
| Thread Tools | |
| Display Modes | |
|
|
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 | |