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 -

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by CaptainJack, 04-24-2026, 11:07 PM
          0 responses
          34 views
          0 likes
          Last Post CaptainJack  
          Started by Mindset, 04-21-2026, 06:46 AM
          0 responses
          128 views
          0 likes
          Last Post Mindset
          by Mindset
           
          Started by M4ndoo, 04-20-2026, 05:21 PM
          0 responses
          183 views
          0 likes
          Last Post M4ndoo
          by M4ndoo
           
          Started by M4ndoo, 04-19-2026, 05:54 PM
          0 responses
          94 views
          0 likes
          Last Post M4ndoo
          by M4ndoo
           
          Started by cmoran13, 04-16-2026, 01:02 PM
          0 responses
          138 views
          0 likes
          Last Post cmoran13  
          Working...
          X