Closing a Position from within an CExpertTrailing class

 
Hello world, I have written my first trailing algorithm. It inherits from CExpertTrailing and i find that under many circumstances i wish to close a position and not just adjust the tp or sl, is there a way i can close a position from within the my trailing object?
 

The standard library classes are difficult to manage if you want to do something not provided.

Please show your attempt (code) if you want coding help.

 
Alain Verleyen:

The standard library classes are difficult to manage if you want to do something not provided.

Please show your attempt (code) if you want coding help.

i figured it out, i used a

CTrade m_trade;

// and a .. where i wanted to close

m_trade.PositionClose(m_symbol.Name());


although if there is a better way i would like to know.