You don't need to use the indicator to do this. Somebody asked on a different forum some time back how you would do a similar sort of thing once the profit reached a certain level.
I pasted the following block of code for him to use in an EA.
Code:
int start()
{
if(AccountEquity()-AccountBalance()>=ACCOUNTPROFITDOLLARS)
CloseAll();
else return(0);
}
void CloseAll()
{
int total = OrdersTotal();
for (int cnt = 0 ; cnt < total ; cnt++)
{
OrderSelect(cnt,SELECT_BY_POS,MODE_TRADES);
if(OrderType()==OP_BUY)
OrderClose(OrderTicket(),OrderLots(),Bid,Slippage, Color);
if(OrderType()==OP_SELL)
OrderClose(OrderTicket(),OrderLots(),Ask,Slippage, Color);
}
}
You would need to define "ACCOUNTPROFITDOLLARS" as an external integer (dollars only) or double (dollars and cents) in Global Scope first.
If you also wanted to incorporate the account balance into the conditions then this is easy too.