YA
Topics
26 Aug 2015, 12:26
2453
6
Replies
Yaseen19
26 Aug 2015, 13:02
RE:
Spotware said:
Dear Trader,
Please have a look at the HistoricalTrade section of our API reference and at the following code snippet.
Position pos; HistoricalTrade histrade; protected override void OnStart() { ExecuteMarketOrder(TradeType.Buy, Symbol, 10000, "label"); pos = Positions.Find("label"); ClosePosition(pos); histrade = History.FindLast("label"); Print("Closing Price ", histrade.ClosingPrice); }Thank you for the quick response. However i recieve this error "Crashed in OnTick with NullReferenceException: Object reference not set to an instance of an object." Any idea on why this happens?
@Yaseen19
Yaseen19
26 Aug 2015, 13:58
RE:
Spotware said:
@Yaseen19