Discussion of article "Better Programmer (Part 04): How to become a faster developer" - page 2

 
CAccountInfo       m_account;  // members of the AccountInfo class
CSymbolInfo        m_symbol;   //members of SymbolInfo class
COrderInfo         m_order;    // OrderInfo members
CHistoryOrderInfo  m_orderhistory; // members of the OrderHistoryInfo class
CPositionInfo      m_position; // members of the PositionInfo class
CDealInfo          m_deal;     // members of the Deal Info class
CTrade             m_trade;    // members of the TradeInfo class
CTerminalInfo      m_terminal; //members of the TerminalInfo class

Good example. I'll have to use it:

int OnInit()//This is the OnInit event
  {//Opening bracket
//below is my code
....


  }//Closing bracket
 
ouble NPB=ND(m_account.Balance()*PortionPC,2);
if(CbT==0||PortChange<0||(PortChange>0&&NPB>PortionBalance))PortionBalance=NPB;
if(Pb+Ph<0)DrawDownPC=-(Pb+Ph)/PortionBalance;
if(!FirstRun&&DrawDownPC>=MaxDDPercent/100)
{       ET(A,displayColorLoss,"Equity Stop Loss Reached");
        if(PlaySounds)PlaySound(AlertSound);
        return(0);
}
if(-(Pb+Ph)>MaxDD)MaxDD=-(Pb+Ph);
MaxDDPer=MathMax(MaxDDPer,DrawDownPC*100);
if(SaveStats)Stats(false,TimeCurrent()<NextStats,PortionBalance,Pb+Ph);


double - on the first line, a letter is missing.

 
Aliaksandr Hryshyn #:

Are you sure you need to know something to teach others?

Actually, you have to know something to teach, but not everyone knows it :)

[Deleted]  
Everything is wonderful and friendly. Thanks.
 
Evgeniy Chumakov #:


double - on the first line, a letter is missing.

Probably part of the 10000 lines bugs. Interesting read