Thread: How to code?
View Single Post
  #1512 (permalink)  
Old 12-23-2008, 12:28 AM
Roger09 Roger09 is offline
Senior Member
 
Join Date: Oct 2008
Location: Vancouver, BC
Posts: 159
Roger09 is on a distinguished road
Quote:
Originally Posted by kk81 View Post
can someone help to program so tat i can buy and sell at the same time...some scripts or etc...

i appreciate it...

example:

if (Stoch1>=Stoch2)
{
ticket=OrderSend(Symbol(), OP_BUY, Lots, Ask, 3, Ask-Stoploss*Point, Ask+TakeProfit*Point, "-", 0, 0, Green);
ticket=OrderSend(Symbol(), OP_SELL, Lots, Bid, 3, Ask-Stoploss*Point, Bid-TakeProfit*Point, "-", 0, 0, Red);
}

the problem is it wil only buy..but i ned it to execute both order...thanks..
MQL4 Learning

Last edited by newdigital; 12-23-2008 at 07:43 AM.
Reply With Quote