[lang=en]
you can get it...
It's codes...
-------------------------------------------------------------------
extern double stoploss= 50;
extern double takeprofit=350;
extern double TrailingStop = 00;
//+------------------------------------------------------------------+
//| expert start function |
//+------------------------------------------------------------------+
int start()
{
for(int cnt=0;cnt<OrdersTotal();cnt++)
{
OrderSelect(cnt, SELECT_BY_POS, MODE_TRADES);
if(OrderSymbol()==Symbol())
{
double stp=OrderStopLoss();
double tpt=OrderTakeProfit();
if(OrderType()==OP_BUY)
{
if(stp==0 || tpt==0)
OrderModify(OrderTicket(),OrderOpenPrice(),Ask-Point*stoploss,Ask+Point*takeprofit,0,Green);
if((Bid-stp)>TrailingStop*Point)
OrderModify(OrderTicket(),OrderOpenPrice(),Bid-Point*TrailingStop,OrderTakeProfit(),0,Green);
}
if(OrderType()==OP_SELL)
{
if(stp==0 || tpt==0)
OrderModify(OrderTicket(),OrderOpenPrice(),Bid+Point*stoploss,Bid-Point*takeprofit,0,Green);
if((stp-Ask)>TrailingStop*Point)
OrderModify(OrderTicket(),OrderOpenPrice(),Ask+Point*TrailingStop,OrderTakeProfit(),0,Green);
}} } }[/lang]