![]() |
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
|
|||||||
| 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. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Senior Member
Join Date: Jan 2008
Posts: 122
Thanks: 0
Thanked 0 times in 0 posts
|
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
|
|
|
|
|
|
#2 |
|
Administrator
Join Date: Mar 2005
Location: Bamberg, Germany
Posts: 9,994
Thanks: 0
Thanked 6 times in 6 posts
|
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.
Dierk
NinjaTrader Customer Service |
|
|
|
|
|
#3 |
|
Senior Member
Join Date: Jan 2008
Posts: 122
Thanks: 0
Thanked 0 times in 0 posts
|
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 |
|
|
|
|
|
#4 |
|
Administrator
Join Date: Mar 2005
Location: Bamberg, Germany
Posts: 9,994
Thanks: 0
Thanked 6 times in 6 posts
|
- 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
Dierk
NinjaTrader Customer Service |
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
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 |