Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

My Questions

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

    My Questions

    Hello,

    I have programm this ExitRule:

    if(BarsSinceEntry() == 3)
    ExitLong("BarsLO");

    But it do not work?!
    Is there a bug?

    #2
    No.

    You probably have issues with signal names. Try not using ANY signal names and it will likely work.
    RayNinjaTrader Customer Service

    Comment


      #3
      @ Ray
      Ok, That works!
      Can you give my an Example how to use a ATR Profit Target in a skript?

      Comment


        #4
        Here is a reference sample that demonstrates how to change stop prices. You would then just pass in a price that represents the current bar's ATR indicator value.

        RayNinjaTrader Customer Service

        Comment


          #5
          I will that the ProfitTarget is active if Bars since entry >0.
          But this Code sems not ok for this?

          if(BarsSinceEntry() > 0)
          SetProfitTarget("", CalculationMode.Ticks, 15);

          I But it unter OnBarUpdate.
          What is wrong?

          Comment


            #6
            SetProfitTarget() once called will always submit orders on incoming fills from an entry. If you want to delay submission, call ExitLongLimit() for example.
            RayNinjaTrader Customer Service

            Comment


              #7
              Variables

              How I can put a Pattern in to a Variable?
              For example I like to to this:

              Patter = Close[0] > Close[1] ;

              if Patter then
              Buy ;

              Witch declaration for such a Pattern is the right?

              Comment


                #8
                You could code something like:
                Code:
                if (Close[0] > Close[1])
                   EnterLong();

                Comment


                  #9
                  @ Dierk

                  Yes, but I would like to put the Pattern in a Variable.
                  Wow I must do this?

                  Comment


                    #10
                    Unfortunately this is not supported. You would need to take an approach like below.

                    Comment


                      #11
                      Equity Indicator

                      I am wondering that there is no Indicator for the Equity of a System?
                      Witch colud be insert to a Chart where a System is running.

                      Comment


                        #12
                        You could custom code your own like here: http://www.ninjatrader-support.com/v...ead.php?t=6651

                        Comment


                          #13
                          Ok, Thanks!

                          How I can to this?

                          ExitLongLimit(EntryPrice+0.0020);

                          Is there a Function for the EntryPrice of a Trade?
                          Position.AvgPrice is not the right?

                          Comment


                            #14
                            Position.AvgPrice is the average price of the position. If you want the fill price of an order you would have to venture into advanced programming with OnOrderUpdate() and OnExecution() methods.

                            RayNinjaTrader Customer Service

                            Comment


                              #15
                              Input

                              Wow I can create a Input for a Script without to use the Wizzard?
                              For Example I like to do something like this:

                              MaPeriode = 10 ;

                              if Close crossover MA then
                              Buy

                              Comment

                              Latest Posts

                              Collapse

                              Topics Statistics Last Post
                              Started by Geovanny Suaza, 02-11-2026, 06:32 PM
                              0 responses
                              587 views
                              0 likes
                              Last Post Geovanny Suaza  
                              Started by Geovanny Suaza, 02-11-2026, 05:51 PM
                              0 responses
                              341 views
                              1 like
                              Last Post Geovanny Suaza  
                              Started by Mindset, 02-09-2026, 11:44 AM
                              0 responses
                              103 views
                              0 likes
                              Last Post Mindset
                              by Mindset
                               
                              Started by Geovanny Suaza, 02-02-2026, 12:30 PM
                              0 responses
                              555 views
                              1 like
                              Last Post Geovanny Suaza  
                              Started by RFrosty, 01-28-2026, 06:49 PM
                              0 responses
                              552 views
                              1 like
                              Last Post RFrosty
                              by RFrosty
                               
                              Working...
                              X