Thread: How to code?
View Single Post
  #1511 (permalink)  
Old 12-22-2008, 11:29 PM
kk81 kk81 is offline
Junior Member
 
Join Date: Sep 2008
Posts: 13
kk81 is on a distinguished road
buy and sell at the same time

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..

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