Is it possible to take take an indicator and have it be treated like an object?

 
We know we can create a trend line on the screen. But, is it an object that stays on the same position as it was placed. But, can we take a indicator like CCI or Stochastics and have them move and give them responsiblities like open and closing trades?
 
Do you write code?
 
phy wrote >>
Do you write code?

No, not yet but I am trying to learn.

 

Ok.. You can get the value of an indicator like CCI or Stochasitc for any bar on the chart and use that value in your trading code.

 
phy wrote >>

Ok.. You can get the value of an indicator like CCI or Stochasitc for any bar on the chart and use that value in your trading code.

thank you. I was looking at some code an was curious if this was correct?

iMA(NULL,0,SlowMA,0,MODE_EMA,PRICE_CLOSE,2);

This means that the time frame is taken direct from the chart on which it is place?

But what happens if you are changing charts to look at the trend?

Does time EA restart or does nothing? would it be better to set the Timframe As a External declared in the beginning? like some like this;

extern int ShortEma = 10;

extern int EMAsTimeFrame = 1;

iMA(Symbol(),EMAsTimeFrame,ShortEma,0,MODE_EMA,PRICE_CLOSE,0);

 

Open another chart to "look at the trend".

Or, specify the time frame in the EA, as you said.

But, if an EA is running on a chart, I would not be messing with that chart.

Reason: