Announcement

Collapse
No announcement yet.

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

    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?

        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.

              Comment


                #8
                Thank you, and wish a nice day

                Comment

                Latest Posts

                Collapse

                Topics Statistics Last Post
                Started by Geovanny Suaza, 02-11-2026, 06:32 PM
                0 responses
                648 views
                0 likes
                Last Post Geovanny Suaza  
                Started by Geovanny Suaza, 02-11-2026, 05:51 PM
                0 responses
                369 views
                1 like
                Last Post Geovanny Suaza  
                Started by Mindset, 02-09-2026, 11:44 AM
                0 responses
                108 views
                0 likes
                Last Post Mindset
                by Mindset
                 
                Started by Geovanny Suaza, 02-02-2026, 12:30 PM
                0 responses
                572 views
                1 like
                Last Post Geovanny Suaza  
                Started by RFrosty, 01-28-2026, 06:49 PM
                0 responses
                573 views
                1 like
                Last Post RFrosty
                by RFrosty
                 
                Working...
                X