Unable to override CExpertTrade Buy and Sell functions

 

Hi, 

I derived my Expert from CExpert.

For OrderManagement CExpert uses CExpertTrade as a member m_trade.

Since I need some modifications of placing buy/sell orders, I've created my on PsExpertTrade derived from CExpertTrade.

The problem now is that the main functions of CExpertTrade (Buy,Sell) are not virtual.

Am I right that this is a bug,.... and if so how could I get a fix (for now I overwrite the standard files,....but with the next update they get lost)


This is my code reduced to the very detail.
You can see that I'm deriving CExpertTrade and initialize it inside of my PsExpert which is derived from CExpert.

CExpert is heavely using m_trade (CExpertTrade) to handle Orders and Positions.

But since CExpertTrade has no virtual functions I'm unable to override.


class PsExpertTrade : public CExpertTrade
{
 . . .
 // override Buy and Sell function
}

/////

class PsExpert : public CExpert
{
 . . .
}
bool PsExpert::InitTrade(ulong magic, CExpertTrade *trade = NULL)
{
 . . .
 m_trade = new PsExpertTrade;
 . . .
}

 
If you want something unique, you need to write all the code from scratch (from scratch). You can take examples from CodeBase and modify it to suit your needs.
Reason: