Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

GetOrderBid/Ask StopLimit Orders

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

    GetOrderBid/Ask StopLimit Orders

    I have some questions in these orders:

    TC= Math.Max(TC,GetCurrentBid());
    EnterLongStop(1,TC,"""");

    Here I don't understand the meaning of MAthMax and also if a market order would be the same that GetCurrentBid.

    And this order:
    double TC= MAX (High,2)[0]
    EnterLongStopLimit(1,TC-5*TickSize,TC,"");
    Can you give me an example like this: If the Highest high of the last 2 bars is 1000, where would be the order placed? In 1000-5= 995??

    Thanks

    #2
    Hi dvercher,

    Best is to Print() all values so you can check what is actually submitted there. Looks like your TC value is recursive. I don't see how it would return anything but GetCurrentBid() unless you're assigning it somewhere else.

    Stop(market) orders will submit a market order once a trade occurs at the stop price.

    Math.Max is a C# function. For additional help with this refer to MSDN docs:


    Help for printing values and general debugging is available here:
    Ryan M.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by CarlTrading, 03-31-2026, 09:41 PM
    1 response
    152 views
    1 like
    Last Post NinjaTrader_ChelseaB  
    Started by CarlTrading, 04-01-2026, 02:41 AM
    0 responses
    87 views
    1 like
    Last Post CarlTrading  
    Started by CaptainJack, 03-31-2026, 11:44 PM
    0 responses
    131 views
    2 likes
    Last Post CaptainJack  
    Started by CarlTrading, 03-30-2026, 11:51 AM
    0 responses
    127 views
    1 like
    Last Post CarlTrading  
    Started by CarlTrading, 03-30-2026, 11:48 AM
    0 responses
    106 views
    0 likes
    Last Post CarlTrading  
    Working...
    X