NinjaTrader Support Forum  
X

Attention!

This website will be down for maintenance from Friday May 24th at 6PM MDT until Saturday May 25th at 11AM MDT. We apologize for the inconvenience. If you need assistance during this time, please email sales@ninjatrader.com


Go Back   NinjaTrader Support Forum > Application Technical Support > Automated Trading

Automated Trading Support for automated trading systems using NinjaScript. Support for our ATI (Automated Trading Interface) used to link an external application such as TradeStation and eSignal to NinjaTrader.

Reply
 
Thread Tools Display Modes
Old 03-03-2008, 11:31 PM   #1
BIGRED
Senior Member
 
Join Date: Jan 2008
Posts: 122
Thanks: 0
Thanked 0 times in 0 posts
Default Auto Execution Pause

I have assembled a functioning trade automation EL code that woks with the NT dll which has one element that leaves me a bit uncomfortable (that is before I add risk controls). I am planning to trade Forex.

What takes place.
Assume that I will get a visual buy signal on a chart at the price of 123.456.

The market trades up to and at that price and therefore the signal appears on the chart. Trading pauses after the one trade that caused the signal.

Trade automation waits for the very next tick before submitting the order.

I have 2 concerns....

1. I could find myself with a chart signal going short and the next trade could be in the reverse direction, causing a buy. In this case I believe I will find my chart position to be out of sync with my brokerage position.
2. That I sit with a chart signal being opposite of my brokerage position when a lot of power comes in and blows through my price. Something I think is likely if trading gets tight.

Has anyone got an idea about how to approach this?

Part of the code follows...

Thanks!
Don


If Sellfilled=0 then begin;
If Close >= SellNT[1] then sellshort next bar at SELLNT STOP;
Sellfilled=1;Buyfilled=0;
If marketposition = -1 and barssinceentry=0 and lastbaronchart then begin;
if Sellfirstorder=0 then begin;
Success = NTSellMarket("MyOrderId", 20000);
Sellfirstorder=1;Buyfirstorder=0;
Last edited by BIGRED; 03-03-2008 at 11:43 PM. Reason: Clarification
BIGRED is offline  
Reply With Quote
Old 03-03-2008, 11:49 PM   #2
NinjaTrader_Dierk
Administrator
 
NinjaTrader_Dierk's Avatar
 
Join Date: Mar 2005
Location: Bamberg, Germany
Posts: 9,994
Thanks: 0
Thanked 6 times in 6 posts
Default

Sorry, not sure I follow. NT executes what ever order you submit from TS to NT via the ATI.

-> you would need to address your concern in your TS EasyLanguage script.

Unfortunately we are no experts in EasyLanguage. Thus we could not provide advise.
NinjaTrader_Dierk is offline  
Reply With Quote
Old 03-04-2008, 12:09 AM   #3
BIGRED
Senior Member
 
Join Date: Jan 2008
Posts: 122
Thanks: 0
Thanked 0 times in 0 posts
Default

Agreed this is a TS / EL issue. The order is held by TS until the a tick that cause the signal on the chart.

1. If there is anything you have in Ninja Script, it might help.

2. Another option might be.. going to stop orders. Does NT to MBT support that type of order?

Thank you
Don
BIGRED is offline  
Reply With Quote
Old 03-04-2008, 12:14 AM   #4
NinjaTrader_Dierk
Administrator
 
NinjaTrader_Dierk's Avatar
 
Join Date: Mar 2005
Location: Bamberg, Germany
Posts: 9,994
Thanks: 0
Thanked 6 times in 6 posts
Default

- you do have full control of your orders in NinjaScript. You may place/cancel them at any time even based on order status change events
- yes, MBT supports stops orders
NinjaTrader_Dierk is offline  
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Avoid same bar execution MrBaffalo Strategy Development 4 10-29-2011 10:51 AM
Checking for SetStopLoss execution? Burga1 Strategy Development 3 01-25-2008 07:40 AM
Execution notification failed RTS Trading Automated Trading 9 09-10-2007 01:11 PM
order execution HelloHello Automated Trading 2 08-29-2007 12:17 AM
Execution on the same bar MrBaffalo Strategy Development 3 01-23-2007 01:57 AM


All times are GMT -6. The time now is 06:22 AM.