Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Orders not going through?

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

    Orders not going through?

    Hi,

    Using Chelsea's chartTraderButton code I have created buttons that buy and sell at the mid point between the Ask and Bid price. When I click the button the orders do not go through? Tested pre-market.

    protected void Button3Click(object sender, RoutedEventArgs e)
    {
    double midPoint = (GetCurrentAsk() + GetCurrentBid())/2;

    if ((GetCurrentAsk() - GetCurrentBid()) > 0.01 )

    EnterShortLimit(Math.Truncate(100 * midPoint) / 100);

    else

    EnterShort();
    }

    #2
    OK I found the problem. I guess strategies default to the Sim account rather than the selected account in chartTrader.

    Comment


      #3
      Hello boreland,

      It seems like you found the answer here, you will need to select the account for the strategy when applying it. If you have any further questions please feel free to update your post.


      I look forward to being of further assistance.

      Comment

      Latest Posts

      Collapse

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