Topics
Replies
c.ostmo
06 Apr 2017, 14:46
I know I have no idea what I'm doing. I needed something like this:
HistoricalTrade lastSell = History.FindLast("Sell");
Print(lastSell.ClosingTime);
However, is there anyway to get the closing date? Will "ClosingTime" return the date, or just the time of day?
Also, this produces an error: "Crashed in OnTick with NullReferenceException: Object reference not set to an instance of an object." What am I missing? (If you could talk to me like I have no idea what I'm doing, I would appreciate it)
@c.ostmo
c.ostmo
05 Apr 2017, 21:54
RE: RE: RE: RE:
I still don't understand this part. How can I get the high and low of the previous day and not just the previous candle? I want the previous day high and low while trading on the minute charts.
hiba7rain said:
Thanks Spotware,
gut i dont know why am getting the values of all last bars and not only the high and low of previous day ??
Spotware said:
Use MarketSeries. Method Last Access a value in the dataseries certain bars ago.
var previouseDayHigh = MarketSeries.High.Last(1); var previouseDayLow = MarketSeries.Low.Last(1);hiba7rain said:
:) any suggestions
hiba7rain said:
Hi All,
am looking for your support, how can i get the higher high and lower low price for previous day?
Thanks
@c.ostmo
c.ostmo
06 Apr 2017, 15:51
RE:
I keep getting this error: Crashed in OnTick with NullReferenceException: Object reference not set to an instance of an object. My question for reference: /forum/cbot-support/11446
Am I missing something? My code is similar to yours and I even replaced it, but I'm getting the same error. What commonly causes this?
Spotware said:
@c.ostmo