• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

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.
    http://www.ninjatrader.com/support/h...egies_tab2.htm

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

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by CriticalMind, 11-29-2015, 12:39 PM
    3 responses
    1,321 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by novel168, 06-14-2019, 09:20 PM
    1 response
    7 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by johnnybegoode, Yesterday, 08:00 PM
    3 responses
    8 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by digibob, Yesterday, 03:00 PM
    1 response
    6 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by yeshujbp, Yesterday, 02:50 PM
    1 response
    11 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Working...
    X