Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

Bad Orders

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

    Bad Orders

    I have a problem, and I'll be glad when somebody respectively.
    My trading system in backtestoch works without problems, but the live trade is not working properly. I attach the log statement.
    The system should specify two separate positions, and each has SetStopLoss and SetProfitTarget. The open position is seated correctly and = 2, but orders StopLoss and Profit Target as soon as the correct quantity = 1, and then are converted into quantity = 2
    Seeing as follows:
    BuyMarket = 1 (Long Position)
    BuyMarket = 1 ((Long Position)
    SellStop = 2 (stoploss)
    SellStop = 2 (stoploss)
    SellLimit = 2 (profittarget)
    SellLimit = 2 (profittarget)

    Can anyone advise me what is the problem? The real deals are made through GainCapital
    Here is the log..


    Here is the fragment code

    {
    if(BarsInProgress == 1)

    return;
    if ((CrossAbove(CCI(Cci), Bo_value, 1))......


    {
    EnterLong(Num_pos,
    "BuyLong1");
    EnterLong(Num_pos,
    "BuyLong2");
    SetProfitTarget(
    "BuyLong1", CalculationMode.Ticks, TP1);
    SetProfitTarget(
    "BuyLong2", CalculationMode.Ticks, TP2);
    SetStopLoss(
    "BuyLong1", CalculationMode.Ticks, Sl, false);
    SetStopLoss(
    "BuyLong2" , CalculationMode.Ticks , Sl, false);
    Print(
    "TrendCCI03-BuyLong"+Instrument.MasterInstrument.Name);

    }

    Attached Files

    #2
    rastotrader, which Order Handling settings are you using in the Strategies tab?

    - http://www.ninjatrader-support.com/H...tegiesTab.html
    BertrandNinjaTrader Customer Service

    Comment


      #3
      I use all three options, it's wrong?

      Comment


        #4
        In the NinjaScript > Order Handling section - which of the two settings are you using?
        BertrandNinjaTrader Customer Service

        Comment


          #5
          As is to be set in NinjaScript tab to work properly?
          Per entry execution or Bystrategyposition?
          Which is correct?
          thanks for the reply.

          Comment


            #6
            I have set ByStrategyPosition

            Comment


              #7
              Please change to PerEntryExecution as Order Handling and rerun your strategy.
              BertrandNinjaTrader Customer Service

              Comment


                #8
                Thank you, and wish a nice day

                Comment

                Latest Posts

                Collapse

                Topics Statistics Last Post
                Started by Ludwik, Today, 03:52 AM
                3 responses
                21 views
                0 likes
                Last Post NinjaTrader_Jesse  
                Started by xepher101, 05-10-2024, 12:19 PM
                3 responses
                42 views
                0 likes
                Last Post NinjaTrader_Jesse  
                Started by jrp2099, Today, 08:01 AM
                1 response
                4 views
                0 likes
                Last Post NinjaTrader_Gaby  
                Started by ETFVoyageur, Yesterday, 02:10 AM
                4 responses
                45 views
                0 likes
                Last Post ETFVoyageur  
                Started by ETFVoyageur, Today, 05:50 AM
                4 responses
                27 views
                0 likes
                Last Post ETFVoyageur  
                Working...
                X