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.
hi,
does anyone knows, in an expert advisor, to program the "OrderSend()" function to open a trade on a symbol different from the one in which the ea is loaded?
thanks in advance.
hi,
does anyone knows, in an expert advisor, to program the "OrderSend()" function to open a trade on a symbol different from the one in which the ea is loaded?
thanks in advance.
OrderSend(NULL, 0.... )
"NULL" specifies the pair for the order. Null means the current pair. You can put any string (that corresponds to a pair, such as GBPUSD) in there.
__________________
"Don't workharder, work smarter." -- my Java professor
extern double Lots1=0.2;
extern double Lots2=0.1;
extern int StopLoss =50;
extern int TakeProfit=100;
int Slippage= 3;
int MagicNumber =123;
bool MySignal=false;
string Symbol1,Symbol2;
double orderprice;
int start()
{
Symbol1="USDCHF", Symbol2="GBPUSD"; //remember to put an "m" in if
//using an Interbankfx mini account, like "GBPUSDm"
if (MySignal==true)
{
if(IsTradeAllowed()==true)
{
sl=StopLoss*MarketInfo(Symbol1,MODE_POINT):
tp=TakeProfit*MarketInfo(Symbol1,MODE_POINT):
orderprice=MarketInfo(Symbol1,MODE_ASK);
OrderSend(Symbol1,OP_BUY,Lots1,orderprice,Slippage,orderprice-sl,orderprice+tp,"",MagicNumber,0,Blue);
}
{
sl=StopLoss*MarketInfo(Symbol2,MODE_POINT):
tp=TakeProfit*MarketInfo(Symbo2,MODE_POINT):
orderprice=MarketInfo(Symbol2,MODE_ASK);
OrderSend(Symbol2,OP_BUY,Lots2,orderprice,Slippage,orderprice-sl,orderprice+tp,"",MagicNumber,0,Blue);
}
return(0);
}
}