Forum

position open price and stop loss as result of many orders opened at different times

Hi, I'm building some simple EA to learn mql5 . I cannot understand how MetaTrader behaves after a series of orders like the following: CTrade m_trade; .... .... m_trade.Buy( 0.1 ,m_symbol.Name(),m_symbol.Ask(), 100 , 0 ,TradeComment) //price of symbol is 105 m_trade.Buy( 0.1

percent time in the market

hi, is there any way in backtesting to know the percent of total backtesting time the EA have been in the market? somthing like tradestation performance report do? thanks

plot indicator with different timeframe than the graph one

Hi, is it possible to plot an indicator (separate window) using different timeframe from the currency's one? ex. currency plot is at H1 I'd like to plot ATR(M15) or ATR(daily)

import csv history data in mt5

Hi, I've historical data of various securities that I'd like to use with mt5. the format is the following: "Date","Time","O","H","L","C","U","D" 10/17/1996,1333,1.5852,1.5852,1.5852,1.5852,0,0 10/17/1996,1333,1.5854,1.5854,1.5854,1.5854,0,0 10/17/1996,1334,1.5852,1.5852,1.5852,1.5852,0,0

1minute OHLC vs every tick - opposite results

I'm getting complete opposite result when testing on every tick or 1min OHLC. the EA and input parameters are exactly the same but in the case of 1min ohlc I get 50000 profit while in every tick I get -7000 losses. this happens on many pairs testing on a period of 2 years 0811-0813 someone have had

running multiple sequential tests

hello, I'd like to run many test with different parameters and/or on different pairs automatically. for example I'd like to test my EA on EURUSD2012 and CADCHF2011 wihtout having to manually restart backtest at the end of the first run, in this way I could let my laptop work overnight and collect

chenge graph formatting permanently!

hello, I'd like to have red and green candle by default. but I cannot find in mt5 the way to change it permanently. I've to change in red bear candle and green bull one's each time I open a new graph. someone knows what to do? thanks

oncalculate OHCL same value

hello guys, I'm making an indicator where I need open close high low of each bar. the problem is that open[i] == close[i] == high[i] == low[i] so if I need to compute Log(close[i]/open[i]); I always get zero!! why is that happening? I've used the debugger on mt5 built in indicators (ex ATR) that

close position on friday

hello guys, I'm trying a very simple EA that should close position at the end of the week . it enters long when the price is above the last high and exit on friday at 23 or for a stoploss triggered. same thing for short position. during backtesting it enters and triggers stoplosses but does not

strategy testing debugging

hello everybody I'm trying to backtest and forward test some advisors I've downloaded, unfortunately some of them don't trade, they take some minutes to run the test and then I've zero trades in the report. it there any debugger other then print()? or do you know which are the main causes for this