Forum

profit problem

In this code, after string dealComment = HistoryDealGetString (dealTicket, DEAL_COMMENT ); , I print the value of dealComment , and it returns all the results correctly. However, totalProfit shows zero for all trades, even though it's actually not zero. double CalculateExpertProfit( datetime

AccountBalance() problem with strategy tester

hi. initial deposit in strategy testers 1000$. lot siz in my EA is: double LotSize = ( double ) DoubleToString (AccountBalance() / 1000 , 2 ); The problem is that with previous profits or losses that change the account balance, new trades are opened with a volume of 1 lot. hi. i want to buy 1/1000

trail stop problem

can any one help why this code does not work for trailing stop for buy position?in compiler has no error but while back test the EA tester stop working. i want when the price increase 50point from open price then stoploss move 50point upward. double StopLossBuy = Bid- 100 * Point double buy=

need help about take profit

in my expert i want the distance between (open price-EMA)*2 for take profit ?how can i do this in mql4