indicator can't get data as without visual mode

 

Log show "history synchronization started "   --Whats' different  as test without visual mode with the display of chart

As I try to find the reason why the result is different ,as test with/without  visual mode with the display of chart .

I find there is different as begin  

visual mode with the display of chart  ""history synchronization started""

visual mode without the display log as below  

Symbols EURUSD: symbol to be synchronized
Symbols EURUSD: symbol synchronized, 3720 bytes of symbol info received
EURUSD: load 27 bytes of history data to synchronize in 0:00:00.001
EURUSD: history synchronized from 2009.01.02 to 2020.06.11
EURUSD,M5: history cache allocated for 81672 bars and contains 81466 bars from 2017.01.02 00:00 to 2018.02.05 23:55
EURUSD,M5: history begins from 2017.01.02 00:00
Tester  EURUSD,M5 (MetaQuotes-Demo): OHLC bar states generating. OnTick executed on the bar begin only
Tester  EURUSD,M5: testing of Experts\MTF_MACD\MTF_MACD4.ex5 from 2018.02.06 00:00 to 2018.02.07 00:00 started with inputs:

visual mode without the display log as below   

Symbols EURUSD: symbol to be synchronized
Symbols EURUSD: symbol synchronized, 3720 bytes of symbol info received
History EURUSD: history synchronization started
History EURUSD: load 27 bytes of history data to synchronize in 0:00:00.001
History EURUSD: history synchronized from 2009.01.02 to 2020.06.11
History EURUSD,M5: history cache allocated for 81672 bars and contains 81466 bars from 2017.01.02 00:00 to 2018.02.05 23:55
History EURUSD,M5: history begins from 2017.01.02 00:00
Tester  EURUSD,M5 (MetaQuotes-Demo): OHLC bar states generating. OnTick executed on the bar begin only
Tester  EURUSD,M5: testing of Experts\MTF_MACD\MTF_MACD4.ex5 from 2018.02.06 00:00 to 2018.02.07 00:00 started with inputs:

Whats different ?
 
I do not know ..
I hope - someone (who is more experienced with it) will reply.
 

indicator

indicator source code 

https://www.mql5.com/en/code/viewcode/1118/128860/parabolic_htf.mq5

Same EA use SAR to tailing 

test case: with visual mode        -- ok as normal.

test case: without visual mode  -- failed get data.(zero data)


How to find out difference ? Any suggestion?

 

I transfer this indicator as an standalone EA for verify

<Advertisement removed>

 

I don't understand your problem!

How do you want to receive the values of the indicator, please provide the code with which you request them.

 
Carl Schreiber:

I don't understand your problem!

How do you want to receive the values of the indicator, please provide the code with which you request them.

After I make question ,I try to transfer the original EA to simply it ( (It take time to reduce some  ,but still lots >,< ). Now this EA use one indicator to open new position.

Attach file

full EA in Check2.zip (SAR) ,
you can use SAR_MTF_1.ex5 to verify result directly
part of initial Initial_SAR.mqh

For your ref.

The more detail test result is using same time frame as test time frame will have no issue, issue will happen as different time frame.
And some relative and not this issue test has done that MTF indicator get accuracy issue in different PC need to verify >.<



Test case 

A. Test with visual mode get data (error message 2020.08.03 10:03:07.085 2020.06.01 07:40:00   CIndicator::GetData: invalid buffer )

B. Test without visual mode get zero data (error message 2020.08.03 10:03:07.085 2020.06.01 07:40:00   CIndicator::GetData: invalid buffer ) only this no others

C. Strategy optimal  get zero data

D.Run mode get data

E.And some special result as run optimal some special case get data. That case trade result is not zero.
E1.And use double click to check the result without visual get zero. And with visual mode get data .... 
Strategy Testing - Algorithmic Trading, Trading Robots - MetaTrader 5 Help
Strategy Testing - Algorithmic Trading, Trading Robots - MetaTrader 5 Help
  • www.metatrader5.com
The Strategy Tester allows you to test and optimize trading strategies (Expert Advisors) before using them for live trading. During testing, an Expert Advisor with initial parameters is once run on history data. During optimization, a trading strategy is run several times with different sets of parameters which allows selecting the most...
Files:
Check2.zip  591 kb
SAR_MTF_1.ex5  386 kb
 

Where do I find: CIndicator::GetData?

Check the declaration/definition/ArraySize of the related buffer - use for example the dubugger.

 
Carl Schreiber:

Where do I find: CIndicator::GetData?

Check the declaration/definition/ArraySize of the related buffer - use for example the dubugger.

Hi Carl 

Thanks your response  

in attachments  MTF_SAR2.zip

I update 1.for error message  with function name (in file indicators.mqh  Update_share_indicator call it)  log 20200804.log

I update 2.code for single period error case. (check by some error message should not happen in with visual mode)  


GetData error  code 4806


The error case is run :  without visual mode.

Compare get data :  with visual mode 


Get problem with use debugger.    I don't know how to debug in without visual mode (With Print only ? ) 

As debugger mode --It's with visual mode . I add some an message in function to show where update data get all data empty .

Documentation on MQL5: Constants, Enumerations and Structures / Environment State / Running MQL5 Program Properties
Documentation on MQL5: Constants, Enumerations and Structures / Environment State / Running MQL5 Program Properties
  • www.mql5.com
A purchased licensed version allows at least 5 activations. The number of activations is specified by seller. Seller may increase the allowed number of activations
Files:
MTF_SAR2.zip  487 kb
20200804.log  8631 kb
Reason: