Possible typo in API Examples
Created at 26 Feb 2014, 19:39
OL
Possible typo in API Examples
26 Feb 2014, 19:39
public class SampleRobot : Robot { protected override void OnStart() { Positions.Opened += Positions_Opened; ExecuteMarketOrder(TradeType.Buy, Symbol, 10000, "myLabel"); } private void PositionsOnOpened(PositionOpenedEventArgs args) { var position = args.Position; if(position.Label == "myLabel") Print("Position opened by SampleRobot"); } //... }
From: /api/reference/positionopenedeventarg
Shouldn't it be
Positions.Opened += PositionsOnOpened;
Insted of
Positions.Opened += Positions_Opened;
Spotware
05 Mar 2014, 14:54
Thank you. We will fix it in next release.
@Spotware