I do not know how to code a position select and modifier.

 
This is my line of codes. However it is not working, any help would be greatly appreciated. 
 
micobez:
This is my line of codes. However it is not working, any help would be greatly appreciated. 

Please change your ink cartridge... I can't see your code...

 
Seng Joo Thio:

Please change your ink cartridge... I can't see your code...

Nice... hehe

 
 if(PositionsTotal()>0){
  
  for(int i=0;i>=0;i++)
  {
string position =PositionGetSymbol( i);
int TYPE=PositionGetInteger(POSITION_TYPE);


// buy
if(TYPE==POSITION_TYPE_BUY);
{
double profitpoint= .70*(Rotprofitbuy-Rotslbuy)+Rotslbuy;
if(Ask>=profitpoint){
double newsl= 0.5*(Rotprofitbuy-Rotslbuy)+Rotslbuy;
bool res= trade.OrderModify(i,NULL,newsl,Rotprofitbuy,NULL,NULL,NULL);
}}
// sell
if(TYPE==POSITION_TYPE_SELL);
{
double profitpoint= 0.7*(Rotslsell-Rotprofitsell)+Rotprofitsell;
if(Bid<=profitpoint){
double newsl= 0.5*(Rotslsell-Rotprofitsell)+Rotprofitsell;
bool res= trade.OrderModify(i,NULL,newsl,Rotprofitbuy,NULL,NULL,NULL);
}
}


}}
}}
Reason: