Error in MarketSeriesHigh

Created at 30 Oct 2012, 11:21
How’s your experience with the cTrader Platform?
Your feedback is crucial to cTrader's development. Please take a few seconds to share your opinion and help us improve your trading experience. Thanks!
ZE

Zenner

Joined 14.07.2012

Error in MarketSeriesHigh
30 Oct 2012, 11:21


Hi

 

When i try to get the high value of the MarketSeries it returns the close value instead.

This is happening both when i use MarketSeries.High.LastValue and MarketSeries.High[MarketSeries.High.Count()-1]

 

Could this be fixed or at least could you tell me another way to access the high that works.

 

Mu servertime is GMT +2

 

Regards,

Zenner


@Zenner
Replies

Zenner
30 Oct 2012, 11:29

I have found out:

The High in the Robot is MarketSeries.High[MarketSeries.High.Count()-2] to get the last value but the MarketSeries.High.LastValue does not give you the last value then but the current.

This works like it should in the indicators but not in the Robots.


@Zenner

Uche
30 Oct 2012, 11:30

Use the 1period SMA, set the source to High.


@Uche

admin
30 Oct 2012, 12:59

Hello,

 

MarketSeries.High.LastValue is the same as MarketSeries.High[MarketSeries.High.Count-1].

It referes to the last bar high price. The last bar keeps changing until it becomes the previous to the last bar. Therefore the last value of the high, the low, and the close will keep changing.

Now, it might happen that the close will equal the high if the price is rising.

 


@admin

Zenner
01 Nov 2012, 11:37

Hi 

Thanks for the answers.

So am I correct when I state that:

Ex. MarketSeries.High.LastValue is referring to High of the current bar which is forming where only the Open is static 

So MarketSeries.High[MArketSeries.High.Count-2] is referring to the last finished bar 


@Zenner

admin
01 Nov 2012, 11:48

Correct.

 


@admin