Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

2 entry orders help!

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

  • bobperez
    replied
    Originally posted by NinjaTrader_ChelseaB View Post
    Hello bobperez,

    Are you running the script with Calculate set to OnPriceChange / or OnEachTick in the strategy parameters window?
    Is TickReplay enabled?
    Yes. Both are set. I also modified the order submission and exit commands on the OnExecutionUpdate method to manage the order with the 1 tick bar:
    Code:
     SubmitOrderUnmanaged(1, OrderAction.Sell, OrderType.Limit, 1, (High[0] + 20 * TickSize), 0, ocoString, "longProfitTarget");
    ,
    Last edited by bobperez; 03-11-2024, 01:49 PM.

    Leave a comment:


  • NinjaTrader_ChelseaB
    replied
    Hello bobperez,

    Are you running the script with Calculate set to OnPriceChange / or OnEachTick in the strategy parameters window?
    Is TickReplay enabled?

    Leave a comment:


  • bobperez
    replied
    Originally posted by NinjaTrader_ChelseaB View Post
    Hello bobperez,

    When NinjaTrader is running with Calculate set to OnBarClose, orders are placed after the bar closes using logic calculated from that bar.

    Below is a link to the help guide on the Calculate property.


    This means that any orders that are triggered from that bar are submitted after the bar closes as the new bar opens. As the order is placed as the new bar opens and the timestamp of the order is within the time of the next bar, the order will show on the next bar.

    If the strategy were running with Calculate as OnPriceChange or OnEachTick, or if the script has intra-bar granularity and submitted orders on a smaller timeframe, this would cause the timestamp of the order to be within the bar it is triggered on as the order may be submitted intra-bar. This order would show on the same bar as the bar that triggered the order submission.

    In historical data, Calculate will always be OnBarClose unless TickReplay is enabled for the data series.

    Further, TickReplay cannot be used for intra-bar order fills. A 1 tick series must be added for 1-tick intra-bar granularity to increase the accuracy of order fills to the price and time of a specific tick.
    This is outlined in the help guide Discrepancies: Real-Time vs Backtest.


    Also, below is a link to a forum thread about intra-bar granularity.
    http://ninjatrader.com/support/forum...297#post491297
    Thank you, Chelsea,

    I added the intrabar granularity as shown on the video link you sent. Still, I must be doing something wrong as the oco order does not appear and the fill is not where the script requires it to be.

    The attached file includes the time modifications and added data series.
    BobPerez
    Attached Files

    Leave a comment:


  • NinjaTrader_ChelseaB
    replied
    Hello bobperez,

    When NinjaTrader is running with Calculate set to OnBarClose, orders are placed after the bar closes using logic calculated from that bar.

    Below is a link to the help guide on the Calculate property.


    This means that any orders that are triggered from that bar are submitted after the bar closes as the new bar opens. As the order is placed as the new bar opens and the timestamp of the order is within the time of the next bar, the order will show on the next bar.

    If the strategy were running with Calculate as OnPriceChange or OnEachTick, or if the script has intra-bar granularity and submitted orders on a smaller timeframe, this would cause the timestamp of the order to be within the bar it is triggered on as the order may be submitted intra-bar. This order would show on the same bar as the bar that triggered the order submission.

    In historical data, Calculate will always be OnBarClose unless TickReplay is enabled for the data series.

    Further, TickReplay cannot be used for intra-bar order fills. A 1 tick series must be added for 1-tick intra-bar granularity to increase the accuracy of order fills to the price and time of a specific tick.
    This is outlined in the help guide Discrepancies: Real-Time vs Backtest.


    Also, below is a link to a forum thread about intra-bar granularity.
    http://ninjatrader.com/support/forum...297#post491297

    Leave a comment:


  • bobperez
    replied
    Originally posted by NinjaTrader_ChelseaB View Post
    Hello bobperez,

    A few modifications would be necessary.

    Lines 138 to 145 where the entries are being submitted in OnMarketData(), this would need to be moved to OnBarUpdate().

    Then entry conditions (currently line 138) would need time conditions added.

    if (longStopEntry == null && shortStopEntry == null && ToTime(Time[0]) == 93800)

    Below is a link to an example of time conditions.
    https://ninjatrader.com/support/help...to_limit_t.htm
    Hi Chelsea,

    I followed your suggestion, and it fills the order on the next bar, instead of placing the oco order on the desired bar.

    Code:
    protected override void OnBarUpdate()
    {
    
    if ( (longStopEntry == null && shortStopEntry == null )
    && ((ToTime(Time[0]) == 82900 )
    || (ToTime(Time[0]) == 113000 )
    || (ToTime(Time[0]) == 113800 )
    || (ToTime(Time[0]) == 142000 )
    )
    )
    
    {
    ocoString = string.Format("unmanagedentryoco{0}", DateTime.Now.ToString("hhmmssffff"));
    longStopEntry = SubmitOrderUnmanaged(0, OrderAction.Buy, OrderType.Limit, 1, 0, (High[0] + 2 * TickSize), ocoString, "longStopEntry");
    shortStopEntry = SubmitOrderUnmanaged(0, OrderAction.SellShort, OrderType.Limit, 1, 0, (Low[0] - 2 * TickSize), ocoString, "shortStopEntry");
    
    
    }
    
    
    }
    Click image for larger version  Name:	Captura20240311.jpg Views:	0 Size:	22.3 KB ID:	1295241
    Last edited by bobperez; 03-11-2024, 12:59 PM.

    Leave a comment:


  • NinjaTrader_ChelseaB
    replied
    Hello bobperez,

    A few modifications would be necessary.

    Lines 138 to 145 where the entries are being submitted in OnMarketData(), this would need to be moved to OnBarUpdate().

    Then entry conditions (currently line 138) would need time conditions added.

    if (longStopEntry == null && shortStopEntry == null && ToTime(Time[0]) == 93800)

    Below is a link to an example of time conditions.

    Leave a comment:


  • bobperez
    replied
    Originally posted by NinjaTrader_ChelseaB View Post
    Hello Andrea,

    To clarify your original question, you are wanting to have opposing orders working at the same time, is this correct?

    I have an example that you may find helpful that uses the unmanaged approach to submit a pair of opposing orders using oco (One Cancels Other) I've made for NinjaTrader 7.

    I've ported this to NT8 for you and I'm attaching both versions so you can compare.

    Below are links to the help guide on using the unmanaged approach.
    https://ninjatrader.com/support/help...d_approach.htm
    https://ninjatrader.com/support/help...runmanaged.htm

    These examples are designed to place orders in real-time so that you can see the orders appear and try and cancel one to see the behavior.
    Unmanaged orders can also be submitted in historical data and be backtested by removing the check for real-time.

    (Updated July 17th, 2018 - corrected assigning the variables to null when the exit on close occurs. Also corrected preventing orders after the exit on close until the new session)

    UnmanagedOCOBracketExample_NT8.zip
    UnmanagedOCOBracketExample_NT7.zip
    Hello,

    What changes have to be done to the NT8 example to place OCO orders exactly at any given time, say for example, "place an oco order if time is 9:38 AM"?

    Thank you.

    Leave a comment:


  • NinjaTrader_ChelseaB
    replied
    Hello PaulMohn,

    I do not have an automated way of adding prints. Prints need to be added specifically to what you are testing and comparing.

    The output from the output window is enough. You can use find to go to a specific time in the output file. You should only be printing the information that you are investigating. If you are adding too many prints, this will just be confusing. Print the time, print all of the values with labels, print labels all comparison operators. That should be all that is printed. Each part will be necessary information.

    Please watch the video I have provided you a link to.


    With your reply it sounds like you are no longer having an issue. Is that the case. You have added a lot information here, but I'm not sure if it's an inquiry about something not working?
    Is the sequence of you pressing keys that you are sharing what you are investigating? Is not orders being added to a list and then looping through that list?

    Have you printed currentPTPrice to the output window?

    There were orders printed in the loop. Were you expecting 5 orders at that time? Is this the issue?
    Last edited by NinjaTrader_ChelseaB; 06-29-2022, 12:09 PM.

    Leave a comment:


  • PaulMohn
    replied
    The spreadsheet appears to be same output from the output window? Can you just provide the text from the output window?
    Yes it is the same. I just removed the prints separators and split (=Split(CELLSWITHCONTENT, " ")) by blank in Google Sheets.
    The 2nd attached txt from post #112 is similar to the spreadsheet (I removed the separators before printing so each printed line has no title nor blank line below it.).

    What are comparing the limit price to?
    Column M and Columns H-I in the Spreadsheet.
    I figured out in the spreadsheet (post #112 research) the Target prices movements. See post #112 research.
    The prints don't show when NumPad7 is pressed but no movement occurs, which doesn't help ( rows 100 to 129 in the spreadsheet - there should be orders state rejected or something for when the NumPad7 is pressed but no movement occurs, instead nothing is there in the prints, only when actual order movement occur does it prints).


    I'm not understanding this question. I type the print and I use string.Format() to add the time and labels to each value I am printing.

    Are you asking how to use a time filter to reduce prints to a certain time frame to reduce the number of prints?
    I'd have thought you had some template to ease the reading.
    In the Spreadsheet we can use filters by value (for example by orders ID etc. that's how I colored semi-automatedly the cells).
    But that's semi-automated. I'd thought you had an automated way to do it. Do you? Would you share it? Thanks!

    The problems anterior to post #116 are all solved now thanks to the ternary operator statement use shared in post #113.

    Here a short demo showing the previous problems solved.

    You could also test it that way
    using the working script link



    As shown in the demo,
    with the working script indicator loaded on your chart
    and the cursor focused anywhere on the chart (ChartControl)

    Press Numpad.Add
    then
    Press NumPad2
    then
    Press NumPad.Multiply

    A 2 contracts/2 Orders position is submitted.

    Then
    Press Numpad.Add
    then
    Press NumPad3
    then
    Press NumPad.Multiply

    An additional 3 contracts/3 Orders position is submitted.

    Then
    Press NumPad7 multiple times

    You see all 5 Target orders (List Count) move together each time Up.


    That's the working proof I was after.


    The new order entry groups issue is the only one remaining. Thanks! I'll test your recommendations for that issue and be back asa. Thanks!
    Last edited by PaulMohn; 06-29-2022, 12:02 PM.

    Leave a comment:


  • NinjaTrader_ChelseaB
    replied
    Hello PaulMohn,

    As a heads up, I am not debugging for you.

    The spreadsheet appears to be same output from the output window? Can you just provide the text from the output window?
    This spreadsheet also does not any value for currentPTPrice.
    What are comparing the limit price to?

    "What tool do you use to simplify prints reading? Can you share it? And demo it in your video sessions?"

    I'm not understanding this question. I type the print and I use string.Format() to add the time and labels to each value I am printing.

    Below is a link to a forum post that has a video how I add prints.
    Please watch the video linked under the label 'Below I am providing a link to videos that demonstrate adding prints to a script to get further information about the behavior of the script.'.
    https://ninjatrader.com/support/foru...121#post791121

    Are you asking how to use a time filter to reduce prints to a certain time frame to reduce the number of prints?
    https://ninjatrader.com/support/help...to_limit_t.htm


    From the spreadsheet: (can we just the have the ouput text file please ?)

    29/06/2022 12:06:23 AM | Account_OrderUpdate | order.ToString(): orderId='fb03b5847268468faeeaaac97d51e2ec' account='Sim101' name='Profit Target' averageFillPrice=0 quantity=1 limitPrice=111.92 orderState=ChangePending id=2214 instrument='CL 08-22' orderAction=Sell orderType='Limit' stopPrice=0 tif=Day oco='afc3202fc183432e8abd5a2f48c331770' filled=0 onBehalfOf='' time='2022-06-29 00:06:23' gtd='2099-12-01' statementDate='2022-06-29'

    29/06/2022 12:06:23 AM | Account_OrderUpdate | order.ToString(): orderId='51f99fd4737948808eb3e6aa1dd6fe8c' account='Sim101' name='Profit Target' averageFillPrice=0 quantity=1 limitPrice=111.92 orderState=ChangePending id=2215 instrument='CL 08-22' orderAction=Sell orderType='Limit' stopPrice=0 tif=Day oco='afc3202fc183432e8abd5a2f48c331771' filled=0 onBehalfOf='' time='2022-06-29 00:06:23' gtd='2099-12-01' statementDate='2022-06-29'

    29/06/2022 12:06:23 AM | Account_OrderUpdate | order.ToString(): orderId='98752e68016a4a75b8f31d249b38daa2' account='Sim101' name='Profit Target' averageFillPrice=0 quantity=1 limitPrice=111.92 orderState=ChangePending id=2221 instrument='CL 08-22' orderAction=Sell orderType='Limit' stopPrice=0 tif=Day oco='201208ff2f2b4384a5a32e11ce00a3930' filled=0 onBehalfOf='' time='2022-06-29 00:06:23' gtd='2099-12-01' statementDate='2022-06-29'

    When the orders are working, it looks like there are 3 orders being changed. How many orders are you are you expecting to be changed?

    What is the value of currentPTPrice?

    With the script you posted, are you 100% certain this is the script with prints added to it?
    I'm not seeing prints or the loop in the script you just posted. These all appears to be commented out. Are you running a different copy of this script?
    Where is the print that I suggested you add in post #111?

    I see now that you previously added more prints to the inside of the loop which was causing the previous confusion. The extra prints do not need to be added. Just print the order information for each order in the loop and nothing else.


    You can start your loop index at the max value and use -- to decrement just as you have suggested.

    Using quantitySelector.Value in your loop does not make sense to me.

    "How would you simplestwise suggest retrieving the groups the targets were originally submitted in (i.e. according to the entry orders order) Thanks!"

    Saving the first set of orders in an Order[] array (if fixed size) or a List<Order> and a second set in another object of the same type would likely work.
    The first hotkey press would loop through the first collection of orders. The second hotkey press would loop through the other collection.
    Any loop would index from 0 to (less than) the list.Count (and nothing else). I would suggest using some arbitrary value from the UI for the index in a loop over a collection. The loop should be over the size of the collection.

    That said, the custom logic is completely up to you.

    I am directing you to use prints to understand the behavior.

    You are saying the code doesn't work, print the values to the output window and share the text file with output. Include labels for each value in the output.

    Print what you are investigating. If you are using indexes, print the index and the size of the collection.

    If you are modifying an order, print the current order information and print the values you are changing it to, print the order object as it updates in the OrderUpdate event to confirm the changes.

    Reduce and simplify. Test one thing at a time. Make a new simple test script if you need to test a small piece of code like a loop.
    When inquiring some else, I highly recommend you reduce your inquiry to be very specific to the line or few lines code.
    When analyzing the output we'll ask: What is the expected output? What is the actual output?
    Last edited by NinjaTrader_ChelseaB; 06-29-2022, 11:09 AM.

    Leave a comment:


  • PaulMohn
    replied
    From this insight

    What's the best way to do a backwards loop in C/C#/C++?

    I've formulated this
    PHP Code:
    for (int index = ((submitTargetsOrdersList.Count > 0) ?
           submitTargetsOrdersList.Count : quantitySelector.Value); index > 0; index--)
    {
     submitTargetsOrdersList[index].LimitPriceChanged = currentPTPrice;
    } 
    

    to loop/move Target orders from the latest occurrences in the list first and backward.

    How would you simplestwise suggest retrieving the groups the targets were originally submitted in (i.e. according to the entry orders order) Thanks!


    I'd expect a way to do it like so

    Hotkey X
    index > (1st Latest entry group count);

    Hotkey Y
    index > (2nd Latest entry group count);

    etc.

    How do you recommend formulating 1st Latest entry group count, 2nd Latest entry group count etc. ? Thanks!


    Last edited by PaulMohn; 06-29-2022, 12:31 PM.

    Leave a comment:


  • PaulMohn
    replied
    Originally posted by NinjaTrader_ChelseaB View Post
    Hello PaulMohn,

    ???

    Why are you using quantitySelector.Value (which is a number of contracts) as the max size for the index? This doesn't make sense.

    Are you trying Math.Min() to take whichever is smaller? Why are you using quantitySelector.Value here at all?

    Further, reduce the output in your post. What is the one set of output from the print loop showing the orderstate, order price, and the new price it's about to be set to?

    I see:

    ChartControl_PreviewKeyDown MOVE UP Target SNIPPETS
    29/06/2022 00:06:00 | index: 0, order.OrderState: Working, order.LimitPrice: 111.92, currentPTPrice

    ChartControl_PreviewKeyDown MOVE UP Target SNIPPETS
    29/06/2022 00:06:00 | index: 1, order.OrderState: Working, order.LimitPrice: 111.92, currentPTPrice

    This is troublesome.. It looks like you pressed the key once, and it printed index 0, then you pressed the key a second time and this printed index 1. It should have printed both indexes 0 and 1 after pressing the key once..

    Did you modify the print loop and add this other print? Or this print appearing outside of the loop when pressing the key?

    This might part of the issue. Maybe the loop you showed us is not the actual code you have. Because it's not looping through the entire list. Maybe it's because your index is incorrect.


    That said, currentPTPrice has a label and no value. What are we comparing the limit price to?


    Working script link


    I'll test next moving targets from elements in the list. Thanks!

    Did you look at the simplified spreadsheet research?

    Simplified spreadsheet
    https://docs.google.com/spreadsheets...gid=2001827143

    What tool do you use to simplify prints reading? Can you share it? And demo it in your video sessions? Thanks!
    Last edited by PaulMohn; 06-29-2022, 10:01 AM.

    Leave a comment:


  • NinjaTrader_ChelseaB
    replied
    Hello PaulMohn,

    ???

    Why are you using quantitySelector.Value (which is a number of contracts) as the max size for the index? This doesn't make sense.

    Are you trying Math.Min() to take whichever is smaller? Why are you using quantitySelector.Value here at all?

    Further, reduce the output in your post. What is the one set of output from the print loop showing the orderstate, order price, and the new price it's about to be set to?

    I see:

    ChartControl_PreviewKeyDown MOVE UP Target SNIPPETS
    29/06/2022 00:06:00 | index: 0, order.OrderState: Working, order.LimitPrice: 111.92, currentPTPrice

    ChartControl_PreviewKeyDown MOVE UP Target SNIPPETS
    29/06/2022 00:06:00 | index: 1, order.OrderState: Working, order.LimitPrice: 111.92, currentPTPrice

    This is troublesome.. It looks like you pressed the key once, and it printed index 0, then you pressed the key a second time and this printed index 1. It should have printed both indexes 0 and 1 after pressing the key once..

    Did you modify the print loop and add this other print? Or this print appearing outside of the loop when pressing the key?

    This might part of the issue. Maybe the loop you showed us is not the actual code you have. Because it's not looping through the entire list. Maybe it's because your index is incorrect.


    That said, currentPTPrice has a label and no value. What are we comparing the limit price to?

    Leave a comment:


  • PaulMohn
    replied
    Ah, I think I got the solution to 1st problem
    PHP Code:
    for (int index = 0; index < ((submitTargetsOrdersList.Count > 0) ?
    submitTargetsOrdersList.Count : quantitySelector.Value); index++) 
    
    Working script
    Last edited by PaulMohn; 06-29-2022, 09:53 AM.

    Leave a comment:


  • PaulMohn
    replied
    Thanks Chelsea. Ah yes I had forgotten about the NumPad7 order states in the conditions.

    Here's the prints for
    1st order
    NumPad7 press and NumPad7+Ctrl press
    2nd Order
    NumPad7 press and NumPad7+Ctrl press

    Demo

    Prints (with attached txt)
    NinjaScript Output 29_06_2022 00_06.txt


    Into a spreadsheet
    https://docs.google.com/spreadsheets...gid=1827034770

    Simplified spreadsheet
    https://docs.google.com/spreadsheets...gid=2001827143

    Using the Simplified Spreadsheet for below research:

    1st POSITION (1st and 2nd orders/Contracts):

    NumPad.Multiply:

    Rows 1 to 10:
    Entries of 1st and 2nd LONG Orders
    and
    Rows 11 to 24:
    Targets and StopLosses placements


    NumPad7 / [MOVE UP 1st and 2nd Orders]:

    Rows 25 to 26:
    Initial currentPTPrice values (.91) (before NumPad7 1st Press) [MOVE UP 1st and 2nd Orders]
    index: 0, order.OrderState: Working, order.LimitPrice: 111.91, currentPTPrice
    index: 1, order.OrderState: Working, order.LimitPrice: 111.91, currentPTPrice

    Rows 27 to 34:
    1st NumPad7 Keypress = 1st and 2nd orders 1st Move (.91 to .92)

    Rows 35 to 36:
    2nd currentPTPrice values (.91 to .92) (after NumPad7 1st Press)
    index: 0, order.OrderState: Working, order.LimitPrice: 111.92, currentPTPrice
    index: 1, order.OrderState: Working, order.LimitPrice: 111.92, currentPTPrice
    Rows 37 to 44:
    2nd NumPad7 Keypress = 1st and 2nd orders 2nd Move (.92 to .93)


    Ctrl+NumPad7 / [MOVE DOWN 1st and 2nd Orders]:

    Rows 45 to 52:
    1st Ctrl+NumPad7 Keypresses = 1st and 2nd orders 1st Move Back (.93 to .92)

    Rows 53 to 60:
    2nd Ctrl+NumPad7 Keypresses = 1st and 2nd orders 2nd Move Back (.92 to .91)








    2nd POSITION (3rd and 4th and 5th orders/Contracts):

    NumPad.Multiply:

    Rows 61 to 75:
    Entries of 3rd, 4th and 5th LONG Orders
    and
    Rows 76 to 96:
    Targets and StopLosses placements

    Rows 97 to 99:
    2nd currentPTPrice values (.91 to .92) (before NumPad7 2nd Press) [MOVE UP 1st, 2nd and 3rd INSTEAD OF 3rd, 4th and 5th Orders]
    index: 0, order.OrderState: Working, order.LimitPrice: 111.91, currentPTPrice
    index: 1, order.OrderState: Working, order.LimitPrice: 111.91, currentPTPrice
    index: 2, order.OrderState: Working, order.LimitPrice: 111.93, currentPTPrice


    NumPad7 / [MOVE UP 1st, 2nd and 3rd INSTEAD OF 3rd, 4th and 5th Orders]:

    1st NumPad7 Keypress =
    Rows 100 to 109:
    1st and 2nd orders 3rd Move Up (.91 to .94)
    and
    Rows 106 to 111:
    3rd order 1st Move Up (.91 to .94)

    Rows 112 to 114:
    3rd currentPTPrice values (.91/.93 to .94) (After NumPad7 2nd Press) [NEW VALUES FOR 1st, 2nd and 3rd INSTEAD OF 3rd, 4th and 5th Orders]
    index: 0, order.OrderState: Working, order.LimitPrice: 111.94, currentPTPrice
    index: 1, order.OrderState: Working, order.LimitPrice: 111.94, currentPTPrice
    index: 2, order.OrderState: Working, order.LimitPrice: 111.94, currentPTPrice


    2nd (and subsequent multiple others) NumPad7 Keypress =
    ????? (not accounted for in the prints)


    Ctrl+NumPad7 / [MOVE DOWN of 1st, 2nd and 3rd INSTEAD OF 3rd, 4th and 5th Orders]:

    Rows 115 to 126 (1st and 2nd target Orders) / 122 to 126 (3rd Target order):
    1st, 2nd and 3rd orders 3rd Move Down (1st and 2nd orders : .94 to .92 ; 3rd order : .94 to .92)
    and
    Rows 127 to 129:
    4th currentPTPrice values (.94 to .92) (After Ctrl+NumPad7 1st Press) [NEW VALUES FOR 1st, 2nd and 3rd INSTEAD OF 3rd, 4th and 5th Orders]
    index: 0, order.OrderState: Working, order.LimitPrice: 111.92, currentPTPrice
    index: 1, order.OrderState: Working, order.LimitPrice: 111.92, currentPTPrice
    index: 2, order.OrderState: Working, order.LimitPrice: 111.92, currentPTPrice


    NEW NumPad7 / [MOVE UP 1st, 2nd and 3rd INSTEAD OF 3rd, 4th and 5th Orders]:

    Rows 130 to 141 (1st and 2nd target Orders) / 136 to 141 (3rd Target order):
    1st, 2nd and 3rd orders (1st and 2nd orders 3rd Move Up : .92 to .94 ; 3rd order 2nf Move Up : .92 to .94)
    and
    Rows 142 to 144:
    5th currentPTPrice values (.92 to .94) (After NumPad7 nth Press / 1st Press after Ctrl+NumPad7) [NEW VALUES FOR 1st, 2nd and 3rd INSTEAD OF 3rd, 4th and 5th Orders]
    index: 0, order.OrderState: Working, order.LimitPrice: 111.94, currentPTPrice
    index: 1, order.OrderState: Working, order.LimitPrice: 111.94, currentPTPrice
    index: 2, order.OrderState: Working, order.LimitPrice: 111.94, currentPTPrice




    1st problem, the prints don't account for multiple NumPad7 presses rows 100 to 129.
    They only show the actual move, but not the missed attempts to move prints.
    How to get them to keep moving the target orders upon multiple NumPad7 keypresses with multiple entries orders?




    I still don't see how to derive the solution from the prints.

    2nd problem, the Target Orders are moved from the list 1st element (i.e 1st, 2nd, 3rd etc not the most recent ones backward, i.e. 5th, 4th, 3rd etc.), and somehow they stop at the 3rd element.
    I think the cause is the quantity.Value value of 3 for the 2nd Entry.
    How would you get it to add the remainder elements in the list too? Thanks!




    I still don't see how to derive the solution from the prints.

    2nd prints (without separators)
    NinjaScript Output 29_06_2022 01_53.txt
    Attached Files
    Last edited by PaulMohn; 06-29-2022, 07:20 AM.

    Leave a comment:

Latest Posts

Collapse

Topics Statistics Last Post
Started by CarlTrading, 05-11-2026, 05:56 AM
0 responses
56 views
0 likes
Last Post CarlTrading  
Started by CarlTrading, 05-10-2026, 08:12 PM
0 responses
33 views
0 likes
Last Post CarlTrading  
Started by Hwop38, 05-04-2026, 07:02 PM
0 responses
195 views
0 likes
Last Post Hwop38
by Hwop38
 
Started by CaptainJack, 04-24-2026, 11:07 PM
0 responses
359 views
0 likes
Last Post CaptainJack  
Started by Mindset, 04-21-2026, 06:46 AM
0 responses
280 views
0 likes
Last Post Mindset
by Mindset
 
Working...
X