I am using IQFeed as a datasource.
It is a pretty simple strategy I pasted some code snippets below.
[SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]protected[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]override[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]void[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] Initialize() {[/SIZE] [SIZE=2]BarsRequired = maPeriods;[/SIZE] [SIZE=2]QuantityType = [/SIZE][SIZE=2][COLOR=#2b91af][SIZE=2][COLOR=#2b91af]QuantityType[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2].Strategy;[/SIZE] [SIZE=2]EntriesPerDirection = 1;[/SIZE] [SIZE=2]EntryHandling = [/SIZE][SIZE=2][COLOR=#2b91af][SIZE=2][COLOR=#2b91af]EntryHandling[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2].UniqueEntries;[/SIZE] [SIZE=2]ExitOnClose = [/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]false[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2];[/SIZE] [SIZE=2]TimeInForce = Cbi.[/SIZE][SIZE=2][COLOR=#2b91af][SIZE=2][COLOR=#2b91af]TimeInForce[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2].Day;[/SIZE] [SIZE=2]CalculateOnBarClose = [/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]true[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2];[/SIZE] [SIZE=2]}[/SIZE] [SIZE=2][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]protected[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]override[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]void[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] OnBarUpdate() {[/SIZE] [SIZE=2]...[/SIZE] [SIZE=2]TryEnter();[/SIZE] [SIZE=2]...[/SIZE] [SIZE=2]}[/SIZE] [SIZE=2][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]private[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]void[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] TryEnter() {[/SIZE] [SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]...[/COLOR][/SIZE][/COLOR][/SIZE] [SIZE=2]EnterLongLimit(GetNumSharesToBuy(Close[0]), Close[0], [/SIZE][SIZE=2][COLOR=#a31515][SIZE=2][COLOR=#a31515]""[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]);[/SIZE] [SIZE=2][COLOR=#008000][SIZE=2][COLOR=#008000]...[/COLOR][/SIZE] [/COLOR][/SIZE][SIZE=2]}[/SIZE] [/SIZE][/SIZE]
1. I just placed and order with an average price of 0 and I am not sure why?
2. I am going to be using MB Trading to trade live and I tried to setup the IQFeed commions to be what they would be with live trading, but I do not think I have it set up right Are the commitions setup right?
3. Should the software have placed 3 trades?
See attached pictures.
Thanks,
Erik
Comment