Forum

Use the iClose() in EA, Why the result is OpenPrice?

I want to print out the Close price and MA price (1 mintue) though the back testing. Here is the code of the EA: //################################################################## #property copyright "Copyright 2014, MetaQuotes Software Corp." #property link " / " #property version "1.00"

How to calculate OrderProfit()?

Sombody tell me I can use the below c alculation formula get the value of OrderProfit() (OrderClosePrice()-OrderOpenPrice())*OrderLots()*MarketInfo(OrderSymbol(),MODE_TICKVALUE)/Point So I test it in a EA file. profit=OrderProfit();

The log file of backtesting

I have used the attached EA file to do the back test. Symbol: USDJPY Model:Every tick Use date: check From:2013.01.01 To:2013.01.31 Period:M1 Spread:Current When I checked the log file, there were something which I don't understand. Here is a part of the log file. 0 14:05:59.823 TestGenerator

The Log file of BackTest

I have used the attached EA file to do the back test. Symbol: USDJPY Model:Every tick Use date: check From:2013.01.01 To:2013.12.31 Period:M1 Spread:Current When I checked the log file, there were something which I don't understand. Here is a part of the log file. 0 14:05:59.823 TestGenerator

The details of OrderProfit()

I thought OrderProfit()=OrderClosePrice()-OrderOpenPrice(); But when I check the log file I find it seems I am wrong. Please, hope somebody can tell me the details of OrderProfit(), how to c alculate it? Thanks a lot