Topics
Replies

andrisom
26 Jan 2016, 09:47

RE:

Spotware said:

Dear Trader,

What you are currently describe doesn't exist. 

Please have a look at the following code snippet, which could help you find the index.

int index = MarketSeries.Close.Count - 1;
double close = MarketSeries.Close[index];
double high = MarketSeries.High[index];
double low = MarketSeries.Low[index];
double open = MarketSeries.Open[index];

 

Thanks a lot!


@andrisom

andrisom
25 Jan 2016, 09:39

RE:

Spotware said:

Dear Trader,

Please have a look at the Referencing Custom Indicators section of our API Programmers Guides.

Thank you very much!

The "Manage References" was the key. :)

I have one more question:

How can I get the OnBar() function "this (actual) bar" index?

protected override void OnBar( int bars ??? )
{

      double v = my_indicator.values[bars];

,,,,

Is the indicator values index the bar count?

The my_indicator.values.LastValue always put same value to me.

What is MT4 Bars in cBots?

Thank you!

ps. Sorry my English!


@andrisom