Add a Print statement inside setStopLoss and you will see that the method is called after orderInfo.setStopLoss( 0 ) and before m_orderInfo.getStopLoss().
Run it under the debugger with a break point on the return. Find out where.
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
I have this class OrderInfo
Why is it if I use
orderInfo = new OrderInfo() ;
orderInfo.setStopLoss( 0 ) ;
Then I pass the OrderInfo object to other object from class Executioner
executioner.setOrderInfo ( orderInfo ) ;
Definition of function setOrderInfo in class Executioner:
public void setOrderInfo( OrderInfo* _orderInfo ) { m_orderInfo = _orderInfo ; }
Inside one of the method of object Executioner:
public void functiona()
{
Print( "Stop loss is: " + m_orderInfo.getStopLoss() ) ; // its 1 not 0
}