Account Equity / Available Margin / Account balance? - page 3 123 New comment William Roeder 2019.06.03 14:24 #21 Algo: I don't understand where I'm wrong. CurrentAccountBalance[i] = AccountBalance(); PreviousAccountBalance = CurrentAccountBalance[i-1];AB is the current balance, all you've done is set all elements to the same exact value. (And I ignore the hard coded array size.) You assume that only closed orders are in history. Using OrdersTotal OrdersHistoryTotal directly and/or no Magic number filtering on your OrderSelect loop means your code is incompatible with every EA (including itself on other charts and manual trading.) Symbol Doesn't equal Ordersymbol when another currency is added to another seperate chart . - MQL4 programming forum MagicNumber: "Magic" Identifier of the Order - MQL4 ArticlesDo not assume history is ordered by date, it's not. Could EA Really Live By Order_History Alone? (ubzen) - MQL4 programming forum Count how many lost orders from the last profit order - MQL4 programming forum orderhistory Select the most recently Last order profit code 123 New comment
CurrentAccountBalance[i] = AccountBalance(); PreviousAccountBalance = CurrentAccountBalance[i-1];AB is the current balance, all you've done is set all elements to the same exact value. (And I ignore the hard coded array size.)Symbol Doesn't equal Ordersymbol when another currency is added to another seperate chart . - MQL4 programming forum
MagicNumber: "Magic" Identifier of the Order - MQL4 Articles
Could EA Really Live By Order_History Alone? (ubzen) - MQL4 programming forum
Count how many lost orders from the last profit order - MQL4 programming forum