Why Custom indicators don't display in the tester chart? help!

 

i use icustom() in the EA, after testing, i open the chart but no custom indicators shown on the chart at all. i couldn't find any problem in my code,finally i used the example code in the BOOK of this website, it still doesn't show, what is the problem? anybody can solve this will be appreciated.

please try the example https://c.mql5.com/mql4/book/mq4/experts/shared.mq4 and https://c.mql5.com/mql4/book/mq4/indicators/rocseparate.mq4.

thanks all.

JASON

 
You need to attach the custom indicator to the chart, iCustom() take the value of the indi but dosen't attach it to the chart.
 

thank you cyberpasta for quick anwser. I have tried everything I can think about including what you mentioned. i found something are really wried:

1. after testing, i opened the chart, no custom indicators there(actually the window and comments are there for separateroc.ext).and it is in the indicators list, i drag and drop from navigator to chart, nothing happened just another separateroc indicator in the indicators list.

2.when i opened a new chart (real time, not in history), and drag & drop, the indicators show perfectly!

3.so this problem is just to tester chart.

if you are interested in this, please try the example given in my first post, share.mql and separateroc.mql. (you know they should be compiled and place into experts and experts/indicators directory)

appreciate!

jason

 
caijs wrote >>

thank you cyberpasta for quick anwser. I have tried everything I can think about including what you mentioned. i found something are really wried:

1. after testing, i opened the chart, no custom indicators there(actually the window and comments are there for separateroc.ext).and it is in the indicators list, i drag and drop from navigator to chart, nothing happened just another separateroc indicator in the indicators list.

2.when i opened a new chart (real time, not in history), and drag & drop, the indicators show perfectly!

3.so this problem is just to tester chart.

if you are interested in this, please try the example given in my first post, share.mql and separateroc.mql. (you know they should be compiled and place into experts and experts/indicators directory)

appreciate!

jason

Dear caijs

I think you are talking about using the Strategy Tester with Visual mode option checked. If you want your indicator show during and after the test. Do followings:

  1. Open a chart, put all indicators required by your EA to the chart or the indicators you want to show in the chart when testing with opened chart.
  2. Save it as a template with name as the same of your testing EA.
  3. Run your test with Visual mode option checked and you will see your indicators on the chart.

Have fun!

bro.

 

thanks brother3th, I didn't check the visual mode option, just using history data with fast mode (open price only), when finish, i click open chart button. anyway, you give me a new idea, i will try it but i don't understand for history data how can i open chart first then test? i only know for real time chart (current market)can open first.

i search through the book on this website, i found a new function Hidetestindicators(bool flag), it could be the cause and solution,but i never set it true anywhere in my code, is it default true for icustom()?

regards,

jason

 
caijs wrote >>

thanks brother3th, I didn't check the visual mode option, just using history data with fast mode (open price only), when finish, i click open chart button. anyway, you give me a new idea, i will try it but i don't understand for history data how can i open chart first then test? i only know for real time chart (current market)can open first.

i search through the book on this website, i found a new function Hidetestindicators(bool flag), it could be the cause and solution,but i never set it true anywhere in my code, is it default true for icustom()?

regards,

jason

For first to open a chart is for saving a template use and not for testing. If you testing using Visual Mode, when you start the test, a history chart will open automatically and show you the test tick by tick. If you think it spends too much time for see it to run, you can push the skip to button to skip to the end. All the buy/sell orders will be recorded in the opened chart.

BTW, I don't think the function hidetestindicators() will be related but you can have try.

bro.

 
hidtestindicators(false) only displays the indicators After the test stops.
Reason: