Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Error on strategy doesn't apppear on log

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

    Error on strategy doesn't apppear on log

    Hello,

    I have an exit strategy that opens a fake position to close it. When executing the code it the line of the strategy appears yellow (I understand this means error) but no error line appears on the log label. None on the output window. I paste the code to see if you find anything:

    if (Position.MarketPosition == MarketPosition.Flat && PosOpened == false && Historical)
    {
    if (PositionType == "L")
    MyOpenOrder = SubmitOrder(0, OrderAction.Buy, OrderType.Market, PosQuantity, 0, 0, "", "");
    else if (PositionType == "S")
    MyOpenOrder = SubmitOrder(0, OrderAction.SellShort, OrderType.Market, PosQuantity, 0, 0, "", "");

    PosOpened = true;
    }

    Thanks

    #2
    Hello guillembm,

    Your Strategy Name cell being Yellow does not indicate and Error. This indicates that your Strategy is in a Historical Position, which I would suspect since you are checking to make sure that you are processing on Historical Data by your Historical check.

    You may see our Help Guide at the link below under the section "Understanding the Strategies tab" for more information.


    Let us know if we can be of any further assistance.
    JCNinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by argusthome, 03-08-2026, 10:06 AM
    0 responses
    80 views
    0 likes
    Last Post argusthome  
    Started by NabilKhattabi, 03-06-2026, 11:18 AM
    0 responses
    46 views
    0 likes
    Last Post NabilKhattabi  
    Started by Deep42, 03-06-2026, 12:28 AM
    0 responses
    29 views
    0 likes
    Last Post Deep42
    by Deep42
     
    Started by TheRealMorford, 03-05-2026, 06:15 PM
    0 responses
    32 views
    0 likes
    Last Post TheRealMorford  
    Started by Mindset, 02-28-2026, 06:16 AM
    0 responses
    66 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Working...
    X