Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Chart Trader Rev Button to custom buttons

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

    Chart Trader Rev Button to custom buttons

    Hello everyone, I'm looking for an opportunity to access the command from the trader's chart to the Rev button
    This is the button that flips the position to the other side of the open

    In other words, I want to connect the ability to flip position to my custom buttons

    for example, this is how this command closes all orders:

    account.Flatten(new[] { Cbi.Instrument.GetInstrument(Instrument.FullName) });

    i need something similar to turn the position to the other side

    How can i do this?

    what syntax?
    Last edited by memonolog; 08-04-2021, 08:10 AM.

    #2
    Hello memonolog,

    Thank you for your post.

    There wouldn't be a specific method that would simply reverse the position, you'd have to create your own logic to grab the instrument position and current quantity, then submit an appropriate order to close and an order to reverse the position when the button is pressed.

    Account.Position: https://ninjatrader.com/support/help...ns_account.htm
    Account.CreateOrder: https://ninjatrader.com/support/help...reateorder.htm
    Account.Submit: https://ninjatrader.com/support/help...nt8/submit.htm

    I've created a simple example indicator script that adds three buttons to the top of the chart window. Clicking the Long or Short buttons will enter or exit a long or short position, while clicking the REV button will reverse an open position.

    Please let us know if we may be of further assistance to you
    Attached Files
    Last edited by NinjaTrader_Kate; 08-04-2021, 09:42 AM.

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Geovanny Suaza, 02-11-2026, 06:32 PM
    0 responses
    581 views
    0 likes
    Last Post Geovanny Suaza  
    Started by Geovanny Suaza, 02-11-2026, 05:51 PM
    0 responses
    338 views
    1 like
    Last Post Geovanny Suaza  
    Started by Mindset, 02-09-2026, 11:44 AM
    0 responses
    103 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by Geovanny Suaza, 02-02-2026, 12:30 PM
    0 responses
    554 views
    1 like
    Last Post Geovanny Suaza  
    Started by RFrosty, 01-28-2026, 06:49 PM
    0 responses
    552 views
    1 like
    Last Post RFrosty
    by RFrosty
     
    Working...
    X