Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Ignored PlaceOrder() ...

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

  • marotom
    replied
    ok. thanks. it succeded in doing. there is a special method for it.

    Leave a comment:


  • NinjaTrader_Bertrand
    replied
    That would be a bit more involved in setting up and not really be supported by us, but some ideas for coding this can gained for example from here : http://stackoverflow.com/questions/1...m-streamwriter

    Leave a comment:


  • marotom
    replied
    Hello,

    When I create a text file with StreamWriter, and during the running of strategy will this file 0 byte and I can't able to retrieve the recorded data only that case, when the strategy is reseted. how can I retrieve the recorded data during the running of the strategy?
    thanks for answer.

    Leave a comment:


  • NinjaTrader_Bertrand
    replied
    Hi Tom, if you work with the Set() method and would like to scale out, it would be needed to scale in first so you basically refer to unique positions representing your scale qty's :

    Leave a comment:


  • marotom
    replied
    Hello Bertrand!
    Thanks for answer.
    I'd have an another question connected with SetStopLoss(). I'm using this syntax:
    SetStopLoss(CalculationMode mode, double value), with setting: ByStrategyPosition.
    when I scale out, the quantity of SetStopLoss won't amend to the actual position quantity. how can I set the quantity of SetStopLoss will reflect the actuall size of position using this syntax? or is it unrelated the Qty? I've tried to monitor the actually Qty of it, (IOrder_StopLoss = SetStopLoss(CalculationMode.Ticks...,) but I can't pass the value of the SetStopLoss to the IOrder object . is it possible? if yes how?
    Thanks for answer.
    Last edited by marotom; 08-31-2011, 06:08 AM.

    Leave a comment:


  • NinjaTrader_Bertrand
    replied
    Correct Tom, it would only be effective with TakeNoAction, as otherwise the strategy would terminate on the rejected orderstate received.

    I believe you could for example submit a too high qty order to your paper account so a rejection from this account would occur, then you could test how your strategy deals with this case.

    Leave a comment:


  • marotom
    replied
    Hello,

    many thanks for clarify! it"s good to know it. :-)
    let me other question. when I right understand if I programmed own order rejection handling in the OnOrderUpdate() method, should I set to RealtimeErrorHandling.TakeNoAction. isn't it? and how can I pretend the "rejected" state as generates the broker's server to check my rejection handling logic? is there a simply procedure ?
    thanks for help.

    Leave a comment:


  • NinjaTrader_Matthew
    replied
    Hello marotom,

    Please review our Forum Post on 'Where do your orders reside?':
    Note: This information is relevant for NinjaTrader 7 only. For NinjaTrader 8, please click here (https://ninjatrader.com/support/helpGuides/nt8/where_do_your_orders_reside_.htm). CQG Orders in a state "Accepted" or "Working" are at the exchange. If the exchange does not support a specific order type, the


    MB Trading
    Orders in a state "Accepted" or "Working" are at the exchange or on MBT's servers in situations where the exchange does not have native support for an order type.
    OCO (One Cancels Other) functionality is simulated on your local PC
    .
    This means as long as the orders submitted with StopLoss, ExitLongStop or any other order method is "accepted" or "working", they will remain on MBT's servers. In the event of a PC crash or disconnect, these orders will still be alive on their servers, however any OCO's functionality will not operate at this time.

    Leave a comment:


  • marotom
    replied
    Hello Bertrand,

    I'm going to MBT. which would the best at this broker? my aim would be, when my strategie run and for some reason (eg: connection lost or error of PC) won't close the entire position using market order. So would be an StopLoss oder ExitLongStop() as "last chance" at my broker independent to my PC to protect my account. At PC error won't delete the StopLoss or ExitLongStop() order. isn't it?
    thanks Tom

    Leave a comment:


  • NinjaTrader_Bertrand
    replied
    Tom, the ExitLongStop() is not a simulated order and is a StopMar****rder just like SetStopLoss would submit. As with any orders it would depend on NT being connected live and thus able to manage your orders. What broker are you trading with currently?

    Leave a comment:


  • marotom
    replied
    Hello Ryan,

    Thanks for help, it works perfectly. But pop up an another question to this theme. When I use an SetStopLoss() order that mean this is submitted as stop market order. So this is completely equivalent to ExitLongStop() method? Can I use insteed of SetStopLoss() full value ExitLongStop() method? (as can be seen in sample reference) I’d like use SetStopLoss, and I’d like the NT should send an real working ordert o the broker and the working of this should be independent of running of NT. Which has more advantages to use as StopLoss? Which could you recommend?

    Thanks for answer. Tom

    Leave a comment:


  • NinjaTrader_RyanM1
    replied
    Hi Tom,

    The message you highlighted in bold is not an error message. It just means the order expires. The default behavior for strategy orders is that they are cancelled if not filled on the bar they're submitted to. To change this you can set liveUntilCancelled = true for the order.

    If using multiple bar objects, you can also use ExitLongStop() advanced overload that allows specifying BarsInProgress.

    ExitLongStop(int barsInProgressIndex, bool liveUntilCancelled, int quantity, double stopPrice, string signalName, string fromEntrySignal)

    Leave a comment:


  • marotom
    replied
    Hello,
    I’d have a question. I use 2 Bars Object in the strategy: 0 and 1. When I’d like use ExitLongStop() order method, I receive error message in output window when I use TraceOrder:
    The method was: ExitLongStop(Stop_Loss_Value); /I have tried out all the Syntax of ExitLongStop() but none of them was correct./

    a) When I call it here: if(BarsInProgress==0) {}
    - 2011.06.22. 8:30:00 Entered internal PlaceOrder() method at 2011.06.22. 8:30:00: BarsInProgress=0 Action=Sell OrderType=Stop Quantity=0 LimitPrice=0 StopPrice=1,4335'3 SignalName='' FromEntrySignal=''
    - 2011.06.22. 8:30:00 Cancelled expired order: BarsInProgress=1: Order='eb78263fc9024454a87a75f042926561/Replay101' Name='Sell' State=Accepted Instrument='$EURUSD' Action=Sell Limit price=0 Stop price=1,43353 Quantity=83 Strategy='STR' Type=Stop Tif=Gtc Oco='' Filled=0 Fill price=0 Token='eb78263fc9024454a87a75f042926561' Gtd='2099.12.01. 0:00:00'
    b) When I call it without: if(BarsInProgress==0) {} or here: if(BarsInProgress==1) {}
    - 2011.06.22. 8:20:00 Entered internal PlaceOrder() method at 2011.06.22. 8:20:00: BarsInProgress=1 Action=Sell OrderType=Stop Quantity=0 LimitPrice=0 StopPrice=1,4335'3 SignalName='' FromEntrySignal=''
    - 2011.06.22. 8:20:00 Cancelled expired order: BarsInProgress=0: Order='e28321bde76a40fb80da39261e936613/Replay101' Name='Sell' State=Accepted Instrument='$EURUSD' Action=Sell Limit price=0 Stop price=1,43353 Quantity=83 Strategy='STR' Type=Stop Tif=Gtc Oco='' Filled=0 Fill price=0 Token='e28321bde76a40fb80da39261e936613' Gtd='2099.12.01. 0:00:00'

    When I don’t add additional Bars Object to strategie it works properly. I’m confused, what can be wrong and how can I fix it?
    Could you help? Thanks: Tom

    Leave a comment:


  • NinjaTrader_Bertrand
    replied
    Tom, thanks - it sounds like you don't scale in with different signal names but then do a scaling out exit - this would not be possible, please give the entry signals unique names (open 1, open 2 etc) so you can scale out from them as needed.

    Leave a comment:


  • marotom
    replied
    Hello Bertrand,
    yes, I'm still in position Open. before it was an part-open (I don't know what is that in English) with name Open too, and it was closed properly. after that I opened again a new part-open with name Open (the sign was the same), but it was ignored the close of it. I attached the Output window text. the error in line 119.
    -if I give a new name etc. Open-1, Open-2, it will close properly-. but at other chart opened 3 times this EnterLong as scale-in, and it was closed without error message. and I'm confused and I don't understand what shouldn't match between two Orders: SignalName? Quantity? I'd like avoid this, but how?-and I didin't find any information about this in Help-
    I hope, I was understandable. thanks Tom
    Last edited by marotom; 08-16-2011, 04:41 AM.

    Leave a comment:

Latest Posts

Collapse

Topics Statistics Last Post
Started by BethLsea, Today, 03:07 AM
0 responses
2 views
0 likes
Last Post BethLsea  
Started by GustavoRodrigzS, 01-07-2025, 05:02 PM
1 response
70 views
0 likes
Last Post Kolumbiann  
Started by diomonexl, Today, 01:38 AM
0 responses
6 views
0 likes
Last Post diomonexl  
Started by kalalex, Today, 01:31 AM
0 responses
8 views
0 likes
Last Post kalalex
by kalalex
 
Started by ybforex, 03-11-2025, 05:30 PM
4 responses
55 views
0 likes
Last Post Leeroy_Jenkins  
Working...
X