having candles

 

Hi,

I have noticed that when my EA starts, by default it sets bars not candle. I would prefer have candles since the beginning automatically. 

Is there a function that can help me?

Regards

 
florenceale: when my EA starts, by default it sets bars not candle.
  1. It doubt that, but if it does, remove the code.
  2. Set a chart up the way you want it, and save a template as "Default"
 
florenceale:

Hi,

I have noticed that when my EA starts, by default it sets bars not candle. I would prefer have candles since the beginning automatically. 

Is there a function that can help me?

Regards

Try this. int Chart_ID

   ChartSetInteger(Chart_ID,CHART_MODE,CHART_CANDLES);
 
florenceale: I have noticed that when my EA starts, by default it sets bars not candle. I would prefer have candles since the beginning automatically. Is there a function that can help me?

I am assuming that this is in the Strategy Tester, because that is the only situation in which this would happen.

This is because, when your start your EA in the strategy tester, it first tries to load a template for the display in the following order:

  1. It will first try to load a template with "name of ea.tpl".
  2. If not found, it will then attempt to load "tester.tpl".
  3. Then it will attempt "default.tpl".
  4. And finally, if all else fails, it sets it to the factory default of "green on black bars".

So, to fix it, set-up a clean chart and set all the visual aspects (such as candles instead of bars, colours, etc.) you want and then save it to the templates:

  • "default.tpl" (used when you open a new chart)
  • "tester.tpl" (used when you test EAs)
Reason: