• 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 Vincere, Today, 03:08 AM
    0 responses
    2 views
    0 likes
    Last Post Vincere
    by Vincere
     
    Started by curious, Today, 02:17 AM
    2 responses
    10 views
    0 likes
    Last Post curious
    by curious
     
    Started by pmmkm, Yesterday, 11:13 PM
    0 responses
    3 views
    0 likes
    Last Post pmmkm
    by pmmkm
     
    Started by pulpiwapi, 03-04-2019, 11:18 PM
    11 responses
    150 views
    0 likes
    Last Post music_p13  
    Started by indy73, 06-25-2019, 10:52 PM
    3 responses
    22 views
    0 likes
    Last Post sledge
    by sledge
     
    Working...
    X