Need Help How can I Code pending orders

 

Dear Programmers

Does any one can code pending orders having trailing for entery and take profit and stoploss from high and low by X number of point from X number of candles

Thx for help

sasco_me@yahoo.com

 
Please explain the idea of expert advisor.
 

Sorry for late

I want to take pending order buy limit from the high of the last x candles by x number of pips and the order modyfied evry new high untill the price decline and take the order and vice versa for sell

Reason: