• 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 Brillo, Today, 07:04 PM
    0 responses
    7 views
    0 likes
    Last Post Brillo
    by Brillo
     
    Started by ttodua, Today, 01:12 AM
    2 responses
    20 views
    0 likes
    Last Post ttodua
    by ttodua
     
    Started by kujista, Today, 02:57 PM
    1 response
    24 views
    0 likes
    Last Post NinjaTrader_Kate  
    Started by henord, Today, 02:40 PM
    6 responses
    31 views
    0 likes
    Last Post NinjaTrader_RyanS  
    Started by Johnny Santiago, Today, 01:57 PM
    1 response
    19 views
    0 likes
    Last Post NinjaTrader_RyanS  
    Working...
    X