Forum

Question on "bars in test" backtesting on M15

Suddenly I was caught by this puzzling behavior of MT4, say Use Date: from 2017.06.13 to 2017.06.14, supposed to be the span of 1 day. On M15 timeframe, it should be (of 1 day) = 4bars/hour x 24 hours = 96 bars. Yet the backtest report says "bars in test" is 1097 bars! Can anyone explain this

Tester Visual Mode opens a single indicator window endlessly

I have no idea why EA is behaving this way in visual mode. Plus it dumps this error message too: failed market sell 0.03 EURUSD.a [Market closed] Error opening order : 10018 Market is closed

my optimization is behaving entirely differently after update to builld 3231

I was happily running optimization until recent update to build 3231 24mar2022 and now I am getting these identical messages pass 61440 tested with error "critical runtime error 565 in OnTick function (error code 565, module Experts\my_ea.ex5, file 65535, line 1, col 1)" in 0 : 12 : 02.882 searching

ama indicator mql4 porting to mql5 help

MQL4 code: //+------------------------------------------------------------------+ //| AMA.mq4 | //| Copyright © 2004, MetaQuotes Software Corp. | //| http://www.metaquotes.net |

2 lines of same indicator in tester visual mode, are they repainting?

I set a plot of AMA in \Indicators\Examples\ as tester.tpl template then I ran a visual mode in tester and the end result showed this plot as attached. Notice how a single parameters setting ended up with 2 obviously different separated lines. Does this mean that AMA is a repainting indicator

How do i invoke an object.function in a mqh?

I am new to MQL5 and am currently stuck with this issue: In my main mq5: // EA.mq5 #include <Trade\PositionInfo.mqh> #include <Trade\Trade.mqh> CPositionInfo myPosition; CTrade myTrade; #include <custom.mqh> and it my mqh "custom.mqh" ... bool MyFunction( void ) { ... bool result; result

Any possibility to convert a repainting indicator to a non-repainting indicator?

2 indicators I encountered that repaint: Fisher and Weiswave3c and I attach them here for your help Weiswave3c repaint was only found when backtesting on MT4 platform as per the different images below: first: then a few bars later

please help diagnose this custom indicator not plotting right

#property strict #property indicator_separate_window #property indicator_buffers 2 #property indicator_plots 2 //--- plot bbwidth #property indicator_label1 "bbwidth" #property indicator_type1 DRAW_NONE #property indicator_color1 clrGreenYellow #property indicator_style1 STYLE_SOLID

iMAOnArrary would not plot

int begin=!prev_calculated?rates_total-BBandPeriod- 1 :rates_total-prev_calculated; double bandsUpper, bandsLower, bandsMain, bbwidth[]; for ( int i=begin;i>= 0 ;i--) { bandsUpper= iBands ( NULL , PERIOD_CURRENT ,BBandPeriod, 2 , 0 , PRICE_CLOSE , MODE_UPPER ,i); bandsLower=