That will require running TWO EAs that talk to each other.
It's called arbitrage, and that type is (perhaps) called geographical arbitrage.
I'm getting (subscribed to) spam advertising an EA for FX Arbitrage (probably triangular arbitrage) for several days now. http://www.forexarbitrages.com
I am not recommending this, have no connection, and realise that it's OT for this forum. It could well be a scam, too. However, it DOES show that this is not a new idea.
As there are pro traders with faster internet, faster computers & deeper pockets than most of this forum, the opportunities will get soaked up pretty quickly by the big boys.
I have considered it myself, and indeed developed an indicator to show triangular arbitrage opportunities, based on 3-way round trip price.
Not quite what you wanted, but some might find it interesting ...
//+---------------------------------+ //| BREW_RoundTrip.mq4 | //+---------------------------------+ #include <stdlib.mqh> string kCommonCurrencies[] = {"AUD", "CAD", "CHF", "EUR", "GBP", "NZD", "USD", "JPY"}; //#include <LibUtil.mqh> #property copyright "Copyright © 2010, Brewmanz" #property link "http://www.metaquotes.net/" #property indicator_chart_window //#property indicator_buffers 8 //#property indicator_color1 Silver //#property indicator_width1 1 //---- input parameters //extern int TimePeriodMinsOr0_NotWorking=0; extern int ScreenCorner_0TL_TR_BL_BR3=0; extern int XOffset=0; extern int YOffset=20; extern int YSpacing=20; string kOBJNAME = "RoundTrip"; //---- display buffers //double V1BuffP25[]; string BaseCurrKey = "~~~"; int fontSize=10; string fontName="Courier New"; color fontColour=DimGray;//Silver; bool ok; int err; //---- work buffers //double TempBuffer2[]; //+-------------------------------------------+ //| Custom indicator initialization function | //+-------------------------------------------+ int init() { //Print("Init() starting"); string short_name; //---- 1 additional buffer used for counting. // IndicatorBuffers(8); //---- indicator line // SetIndexStyle( 0, DRAW_ARROW, EMPTY, indicator_width1, indicator_color1); // SetIndexBuffer(0,V1BuffP25); // SetIndexArrow( 0, kTICK25); //---- name for DataWindow and indicator subwindow label short_name="BREW RoundTrip(" + ")"; IndicatorShortName(short_name); //SetIndexLabel(0,"P+25"); //SetIndexDrawBegin(0,0); Comment("...", TimeToStr(TimeLocal(), TIME_DATE | TIME_SECONDS)); int n = DeleteAllMyObj(kOBJNAME); ok = true; int ixC; string objName; objName = kOBJNAME+BaseCurrKey; ok = ok && ObjectCreate(objName, OBJ_LABEL, 0, 0, 0); ok = ok && ObjectSet(objName, OBJPROP_CORNER, ScreenCorner_0TL_TR_BL_BR3); ok = ok && ObjectSet(objName, OBJPROP_XDISTANCE, XOffset); ok = ok && ObjectSet(objName, OBJPROP_YDISTANCE, YOffset); ok = ok && ObjectSetText(objName, "Hi, I\'m " +objName, fontSize, fontName, fontColour); for(ixC=0; ixC<ArraySize(kCommonCurrencies); ixC++) { objName = kOBJNAME+kCommonCurrencies[ixC]; ok = ok && ObjectCreate(objName, OBJ_LABEL, 0, 0, 0); ok = ok && ObjectSet(objName, OBJPROP_CORNER, ScreenCorner_0TL_TR_BL_BR3); ok = ok && ObjectSet(objName, OBJPROP_XDISTANCE, XOffset); ok = ok && ObjectSet(objName, OBJPROP_YDISTANCE, YOffset + (1+ixC) * YSpacing); ok = ok && ObjectSetText(objName, "Hi, I\'m " +objName, fontSize, fontName, fontColour); } if(!ok) { err = GetLastError(); Comment(TimeToStr(TimeLocal(), TIME_DATE | TIME_SECONDS), "init Something not ok @ ", ", err=", err, ErrorDescription(err)); } else Comment(TimeToStr(TimeLocal(), TIME_DATE | TIME_SECONDS), "init ok"); //---- //Print("Init() ending"); return(0); } //+--------------------------------------+ int deinit() { int n = DeleteAllMyObj(kOBJNAME); //---- Print("deinit done <", n, ">"); //Print("deinit() ending"); Comment(""); return(0); } int DeleteAllMyObj(string pPrefix) { int res = 0; string tags[]; ArrayResize(tags, ObjectsTotal()); int ixTags = 0, ix; for(ix = 0; ix < ObjectsTotal(); ix++) if(StringFind(ObjectName(ix), pPrefix) == 0) { tags[ixTags] = ObjectName(ix); ixTags++; } for(ix = 0; ix < ixTags; ix++) ObjectDelete(tags[ix]); return (ixTags); } //+--------------------------------------+ int start() { //Print("Start() top"); //Print("Init() starting"); string short_name; //---- 1 additional buffer used for counting. IndicatorBuffers(8); //---- indicator line int limit; int counted_bars=IndicatorCounted(); //---- last counted bar will be recounted if(counted_bars>0) counted_bars--; limit=Bars-counted_bars; int ix, ixL; for(ix = limit - 1; ix >= 0; ix--) { // umm no history to worry about } //---- name for DataWindow and indicator subwindow label ok = true; int ixC; string objName, msg, curr3; curr3 = BaseCurrKey; objName = kOBJNAME+curr3; string currL = StringSubstr(Symbol(), 0, 3); string currR = StringSubstr(Symbol(), 3, 3); double bidLR = MarketInfo(currL+currR, MODE_BID); double askLR = MarketInfo(currL+currR, MODE_ASK); double bidL3, bid3R, askL3, ask3R, inv; msg = StringConcatenate("BaseBid=", DoubleToStr(bidLR, Digits), ", Ask=", DoubleToStr(askLR, Digits), ", d=", DoubleToStr(askLR-bidLR, Digits)); ok = ok && ObjectSetText(objName, msg, fontSize, fontName, fontColour); for(ixC=0; ixC<ArraySize(kCommonCurrencies); ixC++) { curr3 = kCommonCurrencies[ixC]; objName = kOBJNAME+curr3; bidL3=0; bid3R=0; askL3=0; ask3R=0; if(bidL3==0) bidL3 = MarketInfo(currL+curr3, MODE_BID); if(bidL3==0) { inv = MarketInfo(curr3+currL, MODE_ASK); if(inv != 0) bidL3 = 1.0 / inv; } if(bid3R==0) bid3R = MarketInfo(curr3+currR, MODE_BID); if(bid3R==0) { inv = MarketInfo(currR+curr3, MODE_ASK); if(inv != 0) bid3R = 1.0 / inv; } if(askL3==0) askL3 = MarketInfo(currL+curr3, MODE_ASK); if(askL3==0) { inv = MarketInfo(curr3+currL, MODE_BID); if(inv != 0) askL3 = 1.0 / inv; } if(ask3R==0) ask3R = MarketInfo(curr3+currR, MODE_ASK); if(ask3R==0) { inv = MarketInfo(currR+curr3, MODE_BID); if(inv != 0) ask3R = 1.0 / inv; } if(bidL3==0 || bid3R==0 || askL3==0 || ask3R==0) { msg = StringConcatenate(curr3, "(Not 3rd)"); } else { double bid3 = bidL3*bid3R; double ask3 = askL3*ask3R; msg = StringConcatenate(curr3, " dBid=", //DoubleToStr(bidL3, 5), "*", DoubleToStr(bid3R, 5), "=", DoubleToStr(bidLR-bid3, 5), ", dAsk=", //DoubleToStr(askL3, 5), "*", DoubleToStr(ask3R, 5), "=", DoubleToStr(ask3-askLR, 5), //", d=", //DoubleToStr(ask3-bid3, 5), ""); if(bid3 > bidLR) msg = msg + " *B*"; if(ask3 < askLR) msg = msg + " *A*"; } ok = ok && ObjectSetText(objName, msg, fontSize, fontName, fontColour); } if(!ok) { err = GetLastError(); Comment(TimeToStr(TimeLocal(), TIME_DATE | TIME_SECONDS), "start Something not ok ", err, ErrorDescription(err)); } //---- return(0); }
Diferent trading platform like ninja trader perhaps.
Alternatively set up a feed into a Visual Basic Platform like Excel and communicate through a virtual harddisk file with the MT4 platforms.
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hello,
Somebody know an expert advisor that can trade in two broker that use mt4 plataform ? I would like to buy eurusd in one and sell eurusd in other. A want to trade in the
diference of the prices. Buying where is cheaper and selling where is expensive.
Regards,