Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Managing Stop Orders via Tradestation

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • NinjaTrader_Ray
    replied
    Yes, likely the case however, just always use a unique id.

    Leave a comment:


  • AJNIN
    replied
    Thanks, I just want to confirm the uniqueness of the OrderID, The Benefits of it being unique is based upon the Account which it resides. If I have 3 different accounts, they can all have an OrderID of "LongEntry1" and not be an issue. Is that correct? The issue is when an account tries to consume the same OrderID.

    TIA. AJNIN

    Leave a comment:


  • NinjaTrader_Ray
    replied
    Yes, NTChange(), any change will ultimatley result in your order at the back of the line.

    Leave a comment:


  • AJNIN
    replied
    Thanks Ray, you are the best in service! Just for future info, If I wanted to change Price and/or Quantity, I would simply call NTChange using the existing Order's OrderID?

    Do you know if any change other then Quantity going down, will keep the orderbook priority in the queue?

    Thanks.

    Leave a comment:


  • NinjaTrader_Ray
    replied
    I believe NT will round the price, you can test this by sending orders to the Sim101 account. You could self manage the fact that you have submitted an order already by using some variables etc..

    Leave a comment:


  • AJNIN
    replied
    Originally posted by NinjaTrader_Ray View Post

    Why do you want to cancel a submit a new stop order? Why not just change the price of the original order?
    The stops won't be updating the price. The cycle for the orders will be the Entry Stop is hit, then I will have the code place the exit Stop, so it will go from a Buy Stop to a Sell Stop. Incase TradeStation needs to refresh the chart mid session, I want to enure that I am not placing a dup order, hence the cancel.

    I would perfer not to lose order book priority by cancelling the existing stop, just to place the same stop again, but I haven't been able to figure out a robust way of checking the stop Price and quantity of the order i'm about to place is the same as the order I'm going to cancel. Any thoughts on that??

    Also, what if the order price that is generated in TS is not exactly the price that the market trades in? Say Crude oil, let's say the price that is generated in TS is 115.123, do I need to round this price to the exchange traded tick? Or will Ninja handle that going in?

    Thanks. Ajnin

    Leave a comment:


  • NinjaTrader_Ray
    replied
    There is no consequence if you cancel a stop that is filled. You can check out NTOrders() for a list of id's uses during the session.

    Why do you want to cancel a submit a new stop order? Why not just change the price of the original order?

    Leave a comment:


  • AJNIN
    replied
    Thanks Ray, OK, I will iterate a number in the OrderID, so it will always be different. A follow up Q.

    Let's say my current OrderID as L12 and my previous OrderID as L11. As I only want to have 1 stop order active, I always want to cancel my previous stop, so in this case OrderID L11. Can I simply write the code

    Value1=NTCancel("L11");
    Value1=NTBuyStop("L12",x,y);

    If L11 has been filled, me trying to cancel the order will not cause any problems, will it? Or is it best served to see if L11 exists and if so, then cancel it.

    If I should check to see if the OrderID exists, can you please gve the the exact code to do so.


    TIA. Ajnin

    Leave a comment:


  • NinjaTrader_Ray
    replied
    Could be a problem --> Always use a unique ID for each new order.

    Leave a comment:


  • AJNIN
    started a topic Managing Stop Orders via Tradestation

    Managing Stop Orders via Tradestation

    Hello, please let me know if I am on the proper path. I'm going to be sending stop orders into Ninja via Tradestation. In the past I have sent Mar****rders without a problem.

    A general question about OrderID. While OrderID needs to be unique, Will there be problems running the code..

    Value1=NTCancel("L");
    Value1=NTBuyStop("L",x,y);

    Let's say 30minutes later the buy stop is elected at y.. I then place the sell stop with..

    Value1=NTCancel("L");
    Value1=NTSellStop("L",A,B);

    Where "L" is always the OrderID, represnting the Long side of the strategy, but there is only 1 Stop Order with the ID of "L" active at a time?

    TIA. AJNIN

Latest Posts

Collapse

Topics Statistics Last Post
Started by Jon17, Today, 04:33 PM
0 responses
1 view
0 likes
Last Post Jon17
by Jon17
 
Started by Javierw.ok, Today, 04:12 PM
0 responses
4 views
0 likes
Last Post Javierw.ok  
Started by timmbbo, Today, 08:59 AM
2 responses
10 views
0 likes
Last Post bltdavid  
Started by alifarahani, Today, 09:40 AM
6 responses
41 views
0 likes
Last Post alifarahani  
Started by Waxavi, Today, 02:10 AM
1 response
20 views
0 likes
Last Post NinjaTrader_LuisH  
Working...
X