Help coding an EQUITY STOP trailing stop

 
Not looking for a regular trailing stop but one that will trail based on equity.

I place several orders through out the day all generated from same EA with same MagicNumber.

Looking for something like if equity reaches +$300,
then equity trail stop of +$100 kicks in and trails forward, or
equity stop of +$100 that doesn't move, but will lock in the profits, should market reverse.

Is this possible to code?
Might take a coding genius =)

Thank you
 
This is certainly possible to code. Generally speaking, there is always one way or another.
Contact me please: mqlexpert {AT} gmail {DOT} com
 
in one word: AccountFreeMargin()