need help producing a stoploss that follows up my orders and modifies the stoploss variable

 

I cannot get it working at all

order= OrderSend(NULL,NULL,0.01,open,2,bot-0.0002,MathMax(profit,profit2)+0.0004,NULL,NULL,NULL,Green);

x=1;

y=1;

}

for(y=1;y>=2000000000;y++);

for(x=1;x>=200;x++);

order=OrderSelect(y,SELECT_BY_POS,MODE_TRADES);

if(order<0){

Alert("Error");

}

else

{

if(Ask>0.0030+OrderOpenPrice())



res = OrderModify(order,Ask,open,MathMax(profit,profit2)+0.0004,NULL,Blue);



}

 
Look in MACD sample.