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 fx.practic, 10-15-2013, 12:53 AM
          5 responses
          5,404 views
          0 likes
          Last Post Bidder
          by Bidder
           
          Started by Shai Samuel, 07-02-2022, 02:46 PM
          4 responses
          95 views
          0 likes
          Last Post Bidder
          by Bidder
           
          Started by DJ888, Yesterday, 10:57 PM
          0 responses
          8 views
          0 likes
          Last Post DJ888
          by DJ888
           
          Started by MacDad, 02-25-2024, 11:48 PM
          7 responses
          159 views
          0 likes
          Last Post loganjarosz123  
          Started by Belfortbucks, Yesterday, 09:29 PM
          0 responses
          8 views
          0 likes
          Last Post Belfortbucks  
          Working...
          X