#region Variables
private int emashort = 5;
private int emamedium = 10;
private int emalong = 15;
private string renko20 = "TF 09-11";
private int renkoperiod = 15;
protected override void Initialize()
AddRenko(renko20, renkoperiod, MarketDataType.Last);
protected override void OnBarUpdate()
if (BarsInProgress == 1) return;
if (CurrentBars[0] <= BarsRequired||CurrentBars[1] <= BarsRequired) return;
//1. Long entry
if(Open[0] > Open[1]
&&Open [0] - Low[0] >4*TickSize
&&Rising(EMA(emashort))
&&Rising(EMA(emamedium))
&&Rising(EMA(emalong))
&&Rising(EMA(BarsArray[1],emashort))&& Rising(EMA(BarsArray[1],emamedium))&& Rising(EMA(BarsArray[1],emalong))
&&Position.MarketPosition == MarketPosition.Flat
I notice in the output screen it says "there is already an existing order with same prices and quantity".
Is the implementation of the above multitimeframe correct? I've tried many iterations but all have the same effect. Note complete code attached as well.
Thanks in advance
DJ
9/2/2011 9:59:09 AM Entered internal SetStopTarget() method: Type=Stop FromEntrySignal='' Mode=Ticks Value=20 Currency=0 Simulated=False
9/2/2011 9:59:09 AM Entered internal PlaceOrder() method at 9/2/2011 9:59:09 AM: BarsInProgress=0 Action=SellShort OrderType=Limit Quantity=1 LimitPrice=692.6 StopPrice=0 SignalName='' FromEntrySignal=''
9/2/2011 9:59:09 AM Ignored PlaceOrder() method: Action=SellShort OrderType=Limit Quantity=1 LimitPrice=692.6 StopPrice=0 SignalName=Sell short' FromEntrySignal='' Reason='There already is a matching order with same prices and quantity'
9/2/2011 9:59:09 AM Cancelled expired order: BarsInProgress=1: Order='cbc5de1c3fce4dab80c789f562a3dd6f/Sim101' Name='Sell short' State=PendingSubmit Instrument='TF 09-11' Action=SellShort Limit price=692.6 Stop price=0 Quantity=1 Strategy='Multitimeframes' Type=Limit Tif=Gtc Oco='' Filled=0 Fill price=0 Token='cbc5de1c3fce4dab80c789f562a3dd6f' Gtd='12/1/2099 12:00:00 AM'
526
Comment