Hi,
I want to create an EA to send orders to a different pair.
So, I want to attach the EA to a graphic and then the EA launch different Ordersend in different pairs, not only the one where is attached.
Can this be done?
When I try I have not success.
Thanks for the feedback.
Hi have same or simliar problem
ticket=OrderSend(Symbol(),OP_SELL,Lots,Bid,3,Ask+TakeProfit*Point,Bid-TakeProfit*Point,"",0,0,Green);
if(StringLen(HedgeSymbol) > 0)
ticket2=OrderSend(My2Symbol,OP_BUY,Lots,MarketInfo(HedgeSymbol, MODE_ASK),3,MarketInfo(HedgeSymbol, MODE_BID)-TakeProfit*Point,Ask+TakeProfit*Point,"",0,0,Green);
OrderSend(Symbol() is executed
but
OrderSend(My2Symbol,
not. nothing happens, nothing to see in journals nor logfiles about.
anyone knows what to do in order to send orders for USD.JPY from EUR.USD or any other chart ?
(metatrader4)
Hi have same or simliar problem
ticket=OrderSend(Symbol(),OP_SELL,Lots,Bid,3,Ask+TakeProfit*Point,Bid-TakeProfit*Point,"",0,0,Green);
if(StringLen(HedgeSymbol) > 0)
ticket2=OrderSend(My2Symbol,OP_BUY,Lots,MarketInfo(HedgeSymbol, MODE_ASK),3,MarketInfo(HedgeSymbol, MODE_BID)-TakeProfit*Point,Ask+TakeProfit*Point,"",0,0,Green);
OrderSend(Symbol() is executed
but
OrderSend(My2Symbol,
not. nothing happens, nothing to see in journals nor logfiles about.
anyone knows what to do in order to send orders for USD.JPY from EUR.USD or any other chart ?
(metatrader4)
I found my mistake.
When I attach the EA to a graphic i.e. EURUSD and make a Ordersend(...) is ok, no issue.
My mistake was with the second order, Ordersend(......, Ask, .....) when Ask is the Ask price for the current graphic. So for a different one:
instead of Ask I must use Marketinfo(EURGBP, MODE_ASK) and instead Bid, MarketInfo(EURGBP, MODE_BID)
I hope this help you also.
Jose
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hi,
I want to create an EA to send orders to a different pair.
So, I want to attach the EA to a graphic and then the EA launch different Ordersend in different pairs, not only the one where is attached.
Can this be done?
When I try I have not success.
Thanks for the feedback.