Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Where to start if I want to create a strategy on a trading set-up?

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

    Thanks Ryan. I will re-read some of the breakout threads here and see if one maybe able to have the Short one working.

    Comment


      Hi Ryan

      I have too many dots on my chart (generated by different indicators). There's an indicator that I really like to change its dots to up/down arrows (small ones). Where can I learn to do that please? Thanks for your tips.

      Comment


        Hello belecona,

        You can see the method signatures for arrows here:



        There's unfortunately no way of configuring the size of arrows.

        A reference sample on drawing objects is here:
        Ryan M.NinjaTrader Customer Service

        Comment


          Thanks Ryan for your prompt response. I forgot about diamond .. would be great to have green/red diamonds LOL! I will revert if I need your help .. Thank you.

          Comment


            Hi Ryan

            I have a strategy with built-in ATM. The ATM element has been working fine though I notice the strategy does not respect the predetermined daily stoploss/target goals anymore. Is there a way to have both ATM and daily goals at the same time so that the strategy will stop after one trade? Or how to get around it? Appreciate your tips. Thank you.

            Note: I tried to add some Trade Limit codes to my strategies .. so far not working.

            Comment


              Hello,

              Just for me to clarify, how specifically are you coding the daily stop limits in your strategy.Can you plase post the code your using to set these and exit the position if reached.

              I look forward to assisting you further.
              BrettNinjaTrader Product Management

              Comment


                Hi Brett

                Thanks for your prompt response. dailygoal and dailystop are coded as private int as follows:

                Code:
                private int  dailygoal = 40;
                private int dailystop = 10;
                Without the ATM element, the strategy has been behaving as expected, ie stop trading when either dailygoal or dailstop was reached (often after the first trade). Now with the ATM element, it continues trading with a valid signal and ignores the daily codes. Please help. Thank you.

                Comment


                  Hello,

                  Thanks for the update. You have only shown me 2 interger values that get set. I need to see the segment in your code where you actually use these variables to limit your trading.

                  I look forward to assisting you further.
                  BrettNinjaTrader Product Management

                  Comment


                    Hi Brett

                    I went through the strategy and only spotted the dailygoal and dailystop mentioned in the beginning + under the Properties as follows:

                    Code:
                    [FONT=Courier New][SIZE=2][FONT=Courier New][SIZE=2][Description([/SIZE][/FONT][/SIZE][/FONT][FONT=Courier New][SIZE=2][COLOR=#800000][FONT=Courier New][SIZE=2][COLOR=#800000][FONT=Courier New][SIZE=2][COLOR=#800000]"Daily Profit Target Goal (in ticks, include all quantities)"[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Courier New][SIZE=2][FONT=Courier New][SIZE=2])]
                    [Category([/SIZE][/FONT][/SIZE][/FONT][FONT=Courier New][SIZE=2][COLOR=#800000][FONT=Courier New][SIZE=2][COLOR=#800000][FONT=Courier New][SIZE=2][COLOR=#800000]"Parameters"[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Courier New][SIZE=2][FONT=Courier New][SIZE=2])]
                    [Gui.Design.DisplayName ([/SIZE][/FONT][/SIZE][/FONT][FONT=Courier New][SIZE=2][COLOR=#800000][FONT=Courier New][SIZE=2][COLOR=#800000][FONT=Courier New][SIZE=2][COLOR=#800000]"OM8. Daily Goal"[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Courier New][SIZE=2][FONT=Courier New][SIZE=2])]
                    [/SIZE][/FONT][/SIZE][/FONT][FONT=Courier New][SIZE=2][COLOR=#0000ff][FONT=Courier New][SIZE=2][COLOR=#0000ff][FONT=Courier New][SIZE=2][COLOR=#0000ff]public[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Courier New][SIZE=2][FONT=Courier New][SIZE=2] [/SIZE][/FONT][/SIZE][/FONT][FONT=Courier New][SIZE=2][COLOR=#0000ff][FONT=Courier New][SIZE=2][COLOR=#0000ff][FONT=Courier New][SIZE=2][COLOR=#0000ff]int[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Courier New][SIZE=2][FONT=Courier New][SIZE=2] DailyGoal
                    {
                    [/SIZE][/FONT][/SIZE][/FONT][FONT=Courier New][SIZE=2][COLOR=#0000ff][FONT=Courier New][SIZE=2][COLOR=#0000ff][FONT=Courier New][SIZE=2][COLOR=#0000ff]get[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Courier New][SIZE=2][FONT=Courier New][SIZE=2] { [/SIZE][/FONT][/SIZE][/FONT][FONT=Courier New][SIZE=2][COLOR=#0000ff][FONT=Courier New][SIZE=2][COLOR=#0000ff][FONT=Courier New][SIZE=2][COLOR=#0000ff]return[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Courier New][SIZE=2][FONT=Courier New][SIZE=2] dailygoal; }
                    [/SIZE][/FONT][/SIZE][/FONT][FONT=Courier New][SIZE=2][COLOR=#0000ff][FONT=Courier New][SIZE=2][COLOR=#0000ff][FONT=Courier New][SIZE=2][COLOR=#0000ff]set[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Courier New][SIZE=2][FONT=Courier New][SIZE=2] { dailygoal = Math.Max([/SIZE][/FONT][/SIZE][/FONT][FONT=Courier New][SIZE=2][COLOR=#800080][FONT=Courier New][SIZE=2][COLOR=#800080][FONT=Courier New][SIZE=2][COLOR=#800080]1[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Courier New][SIZE=2][FONT=Courier New][SIZE=2], value); }
                    }
                    [Description([/SIZE][/FONT][/SIZE][/FONT][FONT=Courier New][SIZE=2][COLOR=#800000][FONT=Courier New][SIZE=2][COLOR=#800000][FONT=Courier New][SIZE=2][COLOR=#800000]"Daily Stop Loss Limit (in ticks, include all quantities)"[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Courier New][SIZE=2][FONT=Courier New][SIZE=2])]
                    [Category([/SIZE][/FONT][/SIZE][/FONT][FONT=Courier New][SIZE=2][COLOR=#800000][FONT=Courier New][SIZE=2][COLOR=#800000][FONT=Courier New][SIZE=2][COLOR=#800000]"Parameters"[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Courier New][SIZE=2][FONT=Courier New][SIZE=2])]
                    [Gui.Design.DisplayName ([/SIZE][/FONT][/SIZE][/FONT][FONT=Courier New][SIZE=2][COLOR=#800000][FONT=Courier New][SIZE=2][COLOR=#800000][FONT=Courier New][SIZE=2][COLOR=#800000]"OM9. Daily Stop"[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Courier New][SIZE=2][FONT=Courier New][SIZE=2])]
                    [/SIZE][/FONT][/SIZE][/FONT][FONT=Courier New][SIZE=2][COLOR=#0000ff][FONT=Courier New][SIZE=2][COLOR=#0000ff][FONT=Courier New][SIZE=2][COLOR=#0000ff]public[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Courier New][SIZE=2][FONT=Courier New][SIZE=2] [/SIZE][/FONT][/SIZE][/FONT][FONT=Courier New][SIZE=2][COLOR=#0000ff][FONT=Courier New][SIZE=2][COLOR=#0000ff][FONT=Courier New][SIZE=2][COLOR=#0000ff]int[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Courier New][SIZE=2][FONT=Courier New][SIZE=2] DailyStop
                    {
                    [/SIZE][/FONT][/SIZE][/FONT][FONT=Courier New][SIZE=2][COLOR=#0000ff][FONT=Courier New][SIZE=2][COLOR=#0000ff][FONT=Courier New][SIZE=2][COLOR=#0000ff]get[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Courier New][SIZE=2][FONT=Courier New][SIZE=2] { [/SIZE][/FONT][/SIZE][/FONT][FONT=Courier New][SIZE=2][COLOR=#0000ff][FONT=Courier New][SIZE=2][COLOR=#0000ff][FONT=Courier New][SIZE=2][COLOR=#0000ff]return[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Courier New][SIZE=2][FONT=Courier New][SIZE=2] dailystop; }
                    [/SIZE][/FONT][/SIZE][/FONT][FONT=Courier New][SIZE=2][COLOR=#0000ff][FONT=Courier New][SIZE=2][COLOR=#0000ff][FONT=Courier New][SIZE=2][COLOR=#0000ff]set[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Courier New][SIZE=2][FONT=Courier New][SIZE=2] { dailystop = Math.Max([/SIZE][/FONT][/SIZE][/FONT][FONT=Courier New][SIZE=2][COLOR=#800080][FONT=Courier New][SIZE=2][COLOR=#800080][FONT=Courier New][SIZE=2][COLOR=#800080]1[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Courier New][SIZE=2][FONT=Courier New][SIZE=2], value); }
                    }
                    [/SIZE][/FONT][/SIZE][/FONT]
                    Since I got the original strategy from a friend who asked me not to share in public, I don't know if the above may help. Thanks.

                    Comment


                      Hello,

                      Unfortunately I would need to see in the code the segment that is doing this to be able to assist. An alternative would to be to contact your Friend and she what he/she has for idea's.

                      The ones you just posted now are simply the GUI to set this when you tart the strategy as a parameter.

                      Let me know if I can be of further assistance.
                      BrettNinjaTrader Product Management

                      Comment


                        I will go through the strategy and see if I may succeed in adding some TradeLimit codes (1 trade per day). Do you know if ATM and TradeLimit codes are compatible in one strategy? Thanks Brett.

                        Comment


                          Hello,

                          I'm not sure what you mean by TradeLimit code, if you mean the below procedure for doing this then yes.

                          You would just need to make a check before you submitted your entry if you have traded before today or not. Setup a counter variable to keep track when your entry condition executes. The reset it at the end of the day or at a certain time at the end of the day.



                          Let me know if I can be of further assistance.
                          BrettNinjaTrader Product Management

                          Comment


                            Hi Brett

                            I meant adding traderCounter and maxTrades codes to the strategy (based on SampleTradeLimiter). I hope they can co-exist with ATM in the same strategy. To me, seemed like a strategy with ATM works on its own upon entering into a trade, ie not part of the strategy anymore!

                            Please correct me if I'm wrong. Thank you. Have a Nice weekend.

                            Comment


                              Hello,

                              Right this is correct however the ATM Strategy is created and started by the strategy. Therefor once your tradeLimit gets hit no more ATM Strategies should be created/entries.

                              Let me know if I can be of further assistance.
                              BrettNinjaTrader Product Management

                              Comment


                                Great news. Thanks Brett. I will pick-up the loose end and try to make the TradeLimit codes work in my strategy with ATM LOL.

                                Comment

                                Latest Posts

                                Collapse

                                Topics Statistics Last Post
                                Started by Geovanny Suaza, 02-11-2026, 06:32 PM
                                0 responses
                                649 views
                                0 likes
                                Last Post Geovanny Suaza  
                                Started by Geovanny Suaza, 02-11-2026, 05:51 PM
                                0 responses
                                370 views
                                1 like
                                Last Post Geovanny Suaza  
                                Started by Mindset, 02-09-2026, 11:44 AM
                                0 responses
                                109 views
                                0 likes
                                Last Post Mindset
                                by Mindset
                                 
                                Started by Geovanny Suaza, 02-02-2026, 12:30 PM
                                0 responses
                                574 views
                                1 like
                                Last Post Geovanny Suaza  
                                Started by RFrosty, 01-28-2026, 06:49 PM
                                0 responses
                                576 views
                                1 like
                                Last Post RFrosty
                                by RFrosty
                                 
                                Working...
                                X