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 argusthome, 03-08-2026, 10:06 AM
          0 responses
          116 views
          0 likes
          Last Post argusthome  
          Started by NabilKhattabi, 03-06-2026, 11:18 AM
          0 responses
          61 views
          0 likes
          Last Post NabilKhattabi  
          Started by Deep42, 03-06-2026, 12:28 AM
          0 responses
          40 views
          0 likes
          Last Post Deep42
          by Deep42
           
          Started by TheRealMorford, 03-05-2026, 06:15 PM
          0 responses
          43 views
          0 likes
          Last Post TheRealMorford  
          Started by Mindset, 02-28-2026, 06:16 AM
          0 responses
          82 views
          0 likes
          Last Post Mindset
          by Mindset
           
          Working...
          X