Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Print Order details

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

    Print Order details

    Hello Team,

    I would like to print the order details in unmanaged approch. I do have setstoploss() and setprofittarget() in my stratergy, If i need to see order details, i can do print in onOrderupdate() function?

    ​protected override void OnOrderUpdate(Order order, double limitPrice, double stopPrice, int quantity, int filled, double averageFillPrice, OrderState orderState, DateTime time, ErrorCode error, string comment)
    {
    Print("order Name is" + order.Name);
    }​



    I am getting error" Class member deleration expected".​

    #2
    Hello jenishij,

    Thank you for your post.

    SetStopLoss() and SetProfitTarget() are order methods only available for strategies using the Managed Approach:In the Unmanaged Approach, you could use SubmitOrderUnmanaged() to create your own protective stop loss and profit target orders, and you may even use an OCO ID to tie them together as one cancels other orders:You could use OnOrderUpdate() and OnExecutionUpdate() to submit your protective orders, similarly to what is demonstrated in this sample script:For an example using orders tied together via OCO in an unmanaged strategy, my colleague posted an unmanaged OCO bracket example found here:I am not sure of what might be causing the error message "Class member declaration expected." You will need to look further into the error details, such as the line number causing the error, in order to narrow down the cause and determine a solution.

    Please let us know if we may be of further assistance.

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by NullPointStrategies, Today, 05:17 AM
    0 responses
    44 views
    0 likes
    Last Post NullPointStrategies  
    Started by argusthome, 03-08-2026, 10:06 AM
    0 responses
    124 views
    0 likes
    Last Post argusthome  
    Started by NabilKhattabi, 03-06-2026, 11:18 AM
    0 responses
    65 views
    0 likes
    Last Post NabilKhattabi  
    Started by Deep42, 03-06-2026, 12:28 AM
    0 responses
    42 views
    0 likes
    Last Post Deep42
    by Deep42
     
    Started by TheRealMorford, 03-05-2026, 06:15 PM
    0 responses
    46 views
    0 likes
    Last Post TheRealMorford  
    Working...
    X