Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Semi Automated Trading

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

    Semi Automated Trading

    Hello,

    I am new to NT programming and was wondering how I could develop something like this:

    1. I get a MA crossover and a position is entered with a stop of 1.5 ATR
    2. Half of the position is exited at 1:1 RRR
    3. Second half is exited when the MA crossover is against the trade direction

    Furthermore I want to control when to look for entries and when to pause... so my style is discretionary...

    I guess i cannot implement this with the ATM capabilities?

    By the way, I have lots of experience in programming... I just dont know how to start with NT..

    thanks a lot!

    thomas

    #2
    Hello Ikeaboy,

    Welcome to the NinjaTrader forums!

    What you want to do can't be done completely with ATM. You would have to program these rules into a NinjaScript automated strategy.

    The strategy wizard is a great place to get familar with generating simple rules and viewing the code for these conditions.

    1) ATM is for discretionary entries and automated exits, so you won't be able to set a condition for entry here. You can see a sample MovingAverageCrossOver strategy through Tools > Edit NinjaScript > Strategy > Open SampleMACrossOver. This help guide article discusses setting up crossover conditions in the condition builder.

    2 & 3) See the reference sample here on scaling out of positions with a NS automated strategy.


    Furthermore I want to control when to look for entries and when to pause... so my style is discretionary...
    You will still have to look at a NinjaScript strategy for what you're trying to do. You can provide yourself visual cues such as DrawArrowDown() when conditions are true instead of order placement though.
    Ryan M.NinjaTrader Customer Service

    Comment


      #3
      Thank you very much Ryan!

      However the last point is not quite clear to me... How do I stop the strategy from placing orders? Do I have to switch the strategy on and off according to if my discretional market conditions are met?


      Thomas

      Comment


        #4
        ikeaboy,

        You can stop your strategy from placing orders simply by not having the code execute any lines that would place orders. So you simply don't want your strategy to do anything like EnterLong() or ExitLong() or similar lines like that.
        Josh P.NinjaTrader Customer Service

        Comment


          #5
          Originally posted by NinjaTrader_Josh View Post
          ikeaboy,

          You can stop your strategy from placing orders simply by not having the code execute any lines that would place orders. So you simply don't want your strategy to do anything like EnterLong() or ExitLong() or similar lines like that.
          i think we are talking about two different things here... i want the whole strategy / the ninja script to pause when i dont see the right market condition...

          i just saw in the control center under the tab "Strategies" that i can Start/Stop the strategies I have added... is this the way to go?

          thanks again!

          thomas

          Comment


            #6
            Thomas,

            If you want the code to not process anymore pressing the Stop button will do the trick.
            Josh P.NinjaTrader Customer Service

            Comment


              #7
              Scaling Out: http://www.ninjatrader.com/support/f...ead.php?t=3751

              I was just looking at this scale out mechanism and was wondering if it is not possible to open ONE position with two contracts and have two FIXED targets? because, if i open two positions i have to pay the commission twice...

              Comment


                #8
                Thomas, unfortunately for the sample you referenced to work the way outlined you would need to scale in first to be able to scale out later on.
                BertrandNinjaTrader Customer Service

                Comment


                  #9
                  so whenenver i want to scale out i have to scale in first? or is it only true for this example?

                  Comment


                    #10
                    It's correct when working with the Set() methods and the signal tracking provided in those.
                    BertrandNinjaTrader Customer Service

                    Comment

                    Latest Posts

                    Collapse

                    Topics Statistics Last Post
                    Started by Segwin, 05-07-2018, 02:15 PM
                    14 responses
                    1,788 views
                    0 likes
                    Last Post aligator  
                    Started by Jimmyk, 01-26-2018, 05:19 AM
                    6 responses
                    837 views
                    0 likes
                    Last Post emuns
                    by emuns
                     
                    Started by jxs_xrj, 01-12-2020, 09:49 AM
                    6 responses
                    3,293 views
                    1 like
                    Last Post jgualdronc  
                    Started by Touch-Ups, Today, 10:36 AM
                    0 responses
                    13 views
                    0 likes
                    Last Post Touch-Ups  
                    Started by geddyisodin, 04-25-2024, 05:20 AM
                    11 responses
                    63 views
                    0 likes
                    Last Post halgo_boulder  
                    Working...
                    X