Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Help me with a order

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

    #46


    {
    if (Close[0] >= Position.AvgPrice +3 * TickSize && PriMove)
    { SetStopLoss(CalculationMode.Price,Position.AvgPric e -
    5 * TickSize); PriMove = false; }

    if (Close[0] >= Position.AvgPrice +8 * TickSize && SegMove)
    { SetStopLoss(CalculationMode.Price,Position.AvgPric e +
    1 * TickSize); SegMove = false; }

    if (Close[0] >= Position.AvgPrice +14 * TickSize && TerMove)
    { SetStopLoss(CalculationMode.Price,Position.AvgPric e +
    7 * TickSize); TerMove = false; }

    if (Close[0] >= Position.AvgPrice +20 * TickSize)
    { SetStopLoss(CalculationMode.Price,Position.AvgPric e +
    15 * TickSize);}
    }

    // Condicion de Entrada en Largo.
    if (ToTime(Time[0]) == ToTime(horas,minutos,00))
    { EnterLongStop(
    0,true,contratos,Close[0] +7 * TickSize, "Largo 1"); }

    Comment


      #47
      firecan,

      Make sure you are managing your bool variables effectively. They should be true initially and also reset back to true once you're flat.

      To help debug this: You can add print statements to any block of code to check if it's being processed properly.

      Simplify to a two stage movement first and verify this is working properly, before adding more movements.
      Ryan M.NinjaTrader Customer Service

      Comment


        #48
        Sorry, I am tired of trying to run the script, I take two months and nothing. If possible, please make it work will be grateful.

        Comment


          #49
          firecan, we can for sure understand the frustrations involved in custom coding and debugging, however unfortunately we would not offer such services - if you want this code rather professionally custom developed for you the best option would be checking with a certified NinjaScript consultant -

          BertrandNinjaTrader Customer Service

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by DJ888, 04-16-2024, 06:09 PM
          6 responses
          18 views
          0 likes
          Last Post DJ888
          by DJ888
           
          Started by Jon17, Today, 04:33 PM
          0 responses
          1 view
          0 likes
          Last Post Jon17
          by Jon17
           
          Started by Javierw.ok, Today, 04:12 PM
          0 responses
          6 views
          0 likes
          Last Post Javierw.ok  
          Started by timmbbo, Today, 08:59 AM
          2 responses
          10 views
          0 likes
          Last Post bltdavid  
          Started by alifarahani, Today, 09:40 AM
          6 responses
          41 views
          0 likes
          Last Post alifarahani  
          Working...
          X