- Главная
- Сообщество
- Программирование
- How to create a EA that can open a long and short trade simu...
Edit Your Comment
How to create a EA that can open a long and short trade simultaneously?
Участник с Nov 09, 2010
2 комментариев
Nov 09, 2010 at 15:14
Участник с Nov 09, 2010
2 комментариев
How to create a EA that can open a long and short trade simultaneously?
Участник с Aug 20, 2009
266 комментариев
Nov 09, 2010 at 16:44
Участник с Aug 20, 2009
266 комментариев
Just do nothing...........it has the same effect but is cheaper.
Wealth Creation Through Technology
Участник с Nov 09, 2010
2 комментариев
Участник с Oct 20, 2010
13 комментариев
Nov 11, 2010 at 03:33
Участник с Oct 20, 2010
13 комментариев
What is your logic to open Long and Short order ?
You can try use EA template to create simple logic EA.
<a href='https://forex-rebel-martin.co.cc/class-mql-1' target='_blank'><img src='https://www.myfxbook.com/files/RebelMartin/SmallBook_WC.jpg'/></a><a href='https://forex-rebel-martin.co.cc/class-mql-1' target='_blank'><img src='https://img233.imageshack.us/img233/4753/mqlgui.jpg'/></a>
Click on the picture will give you the link to EA creator template for FREE !
You can try use EA template to create simple logic EA.
<a href='https://forex-rebel-martin.co.cc/class-mql-1' target='_blank'><img src='https://www.myfxbook.com/files/RebelMartin/SmallBook_WC.jpg'/></a><a href='https://forex-rebel-martin.co.cc/class-mql-1' target='_blank'><img src='https://img233.imageshack.us/img233/4753/mqlgui.jpg'/></a>
Click on the picture will give you the link to EA creator template for FREE !
forex_trader_7
Участник с Aug 01, 2009
941 комментариев
Nov 11, 2010 at 06:21
(отредактировано Nov 11, 2010 at 06:23)
Участник с Aug 01, 2009
941 комментариев
Dude please do something about that signature of yours. Rather pay for a banner add or something. That way my Addblock will at least block it.
Участник с Dec 20, 2010
4 комментариев
Jan 02, 2011 at 16:14
Участник с Dec 20, 2010
4 комментариев
mrniceguy posted:First your broker have to support hedging. Here's a dumb simple ea code where is actually no logic built but you can see how the open buy and open sell are formulated:
How to create a EA that can open a long and short trade simultaneously?
//+------------------------------------------------------------------+
//| mo_bidir_v0_1.mq4 |
//| |
//| - Works best in 5M timeframe |
//| - Bug fix to stop_loss in line 22 2010.04.07 |
//+------------------------------------------------------------------+
#property copyright 'Copyright © 2010 - Monu Ogbe'
#define MAGIC 1234
#define IDENT 'mo_bidir_v0_1'
extern double lots = 1;
extern double stop_loss = 80; // (8 pips) optimise 50-2000
extern double take_profit = 750; // (75 pips) optimise 50-2000
int last_bar = 0;
//**************below this line you see the op_buy & sell WARNING there is no trading logic in this so you have to make it
// **************othervise pure coin toss
int start(){
if (last_bar == Bars) return(0);
last_bar = Bars;
if (OrdersTotal() == 0){
OrderSend(Symbol(), OP_BUY, lots ,Ask, 3, Ask - stop_loss * Point, Bid + take_profit * Point, IDENT, MAGIC, 0, Blue);
OrderSend(Symbol(), OP_SELL, lots ,Bid, 3, Bid + stop_loss * Point, Ask - take_profit * Point, IDENT, MAGIC, 0, Red);
}
return(0);
}
“Logic will get you from A to B. Imagination will take you everywhere.” - Albert Ainstein
Участник с Dec 09, 2010
217 комментариев
Jan 17, 2011 at 14:58
Участник с Dec 09, 2010
217 комментариев
actually, i dont know that i understand your issue as well as i might, but i will try to explain how complicated we could make things..
you could set up two separate metatrader computers and link them with serial null modem cables and then issue trade requests to both computers at the same time.
actually, one computer would get the request first and then the other computer would get the request to open a trade, but we are talking split seconds and the two computers would both be processing their individual trades at the same time.
are you perhaps trying to arbitrage two separate brokers?
maybe not.
or, you could just run two metatrader terminals on a single box and then control them using an external program or set of datafiles and just have each metatrader terminal read said files or device driver or whatever.
when you say simultaneously, i am assuming that you are talking about not wanting to place the first trade and then needing to wait for that trade to process before you can move on to placing the second trade.
assuming that this is your problem, either multiple boxes running separate metatraders.
also, i am assuming that if one has two separate computers side by side that are running the same trading account, does placing a trade on the first computer cause the second metatrader terminal to issue some kind of trade context busy error?
anyways.
you could set up two separate metatrader computers and link them with serial null modem cables and then issue trade requests to both computers at the same time.
actually, one computer would get the request first and then the other computer would get the request to open a trade, but we are talking split seconds and the two computers would both be processing their individual trades at the same time.
are you perhaps trying to arbitrage two separate brokers?
maybe not.
or, you could just run two metatrader terminals on a single box and then control them using an external program or set of datafiles and just have each metatrader terminal read said files or device driver or whatever.
when you say simultaneously, i am assuming that you are talking about not wanting to place the first trade and then needing to wait for that trade to process before you can move on to placing the second trade.
assuming that this is your problem, either multiple boxes running separate metatraders.
also, i am assuming that if one has two separate computers side by side that are running the same trading account, does placing a trade on the first computer cause the second metatrader terminal to issue some kind of trade context busy error?
anyways.
Участник с Jun 09, 2011
186 комментариев
Jun 11, 2011 at 20:11
Участник с Jun 09, 2011
186 комментариев
looks like viper got it covered
http://www.freeforexrebates .info
*Коммерческое использование и спам не допускаются и могут привести к аннулированию аккаунта.
Совет: Размещенные изображения или ссылки на Youtube автоматически вставляются в ваше сообщение!
Совет: введите знак @ для автоматического заполнения имени пользователя, участвующего в этом обсуждении.