Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Remove SLM orders

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

    Remove SLM orders

    I got a script here from good 'ole Leeroy Jenkins and am trying to tailor it to my needs. So far I've been successful at EnterLongStopLimit() and EnterShortStopLimit to show up where I want them to. But the script doesn't execute the order to ExitLong() or ExitShort(). For example, I press the button to go long SLM a tick above bar close. The order shows up. But let's say before the bar closes I change my mind. Clicking the button to then exit doesn't work. Maybe I have the wrong command/syntax or whatever it's called?

    Below is some of the code. Thanks for any direction you can give me.

    {
    if (longButtonClicked)
    EnterLongStopLimit(Convert.ToInt32(1), Open[0] + (7 * TickSize), Open[0] + (7 * TickSize));

    if (shortButtonClicked)
    EnterShortStopLimit(Convert.ToInt32(1), Open[0] + (-7 * TickSize), Open[0] + (-7 * TickSize));

    if (!longButtonClicked)
    ExitLong();
    if (!shortButtonClicked)
    ExitShort();
    }

    #2
    Hi inthemoney, the ExitLong/ExitShort methods will not exit a position if one does not exist. You need to click the x symbol on the limit/stop order that is resting on the chart to cancel it. Turn on Chart Trader on the chart to see the orders.

    Kind regards,
    -ChrisL

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by NullPointStrategies, Yesterday, 05:17 AM
    0 responses
    54 views
    0 likes
    Last Post NullPointStrategies  
    Started by argusthome, 03-08-2026, 10:06 AM
    0 responses
    130 views
    0 likes
    Last Post argusthome  
    Started by NabilKhattabi, 03-06-2026, 11:18 AM
    0 responses
    71 views
    0 likes
    Last Post NabilKhattabi  
    Started by Deep42, 03-06-2026, 12:28 AM
    0 responses
    44 views
    0 likes
    Last Post Deep42
    by Deep42
     
    Started by TheRealMorford, 03-05-2026, 06:15 PM
    0 responses
    49 views
    0 likes
    Last Post TheRealMorford  
    Working...
    X