My data provider is IQFeed. I'm testing the continuous-adjusted ES in Portfolio Trader, and I've selected @ES#C under the CME exchange with default exchange settings.
For the strategy, I'm using test code which simply makes a trade at every bar close:
Code: Select all
Inputs:
NumberOfContracts ( 1 );
Variables:
goLong ( false );
if BarStatus(2)=2 then
if goLong then
begin
goLong = false;
Buy ( "Long" ) NumberOfContracts contracts next bar market;
Sell ("SellOut") all contracts next bar market;
end
else begin
goLong = True;
SellShort ("Short") NumberOfContracts contracts next bar market;
BuyToCover ("BuyOut") all contracts next bar market;
end;
I thought maybe I needed to do something in QuoteManager, but when I open a 1-hour @ES#C chart in Multicharts, the 4:15 and 5pm bars are present.
So my question is, why would PT behave differently than MC, and more importantly, what am I doing wrong?
Many thanks