Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Super Trend For Ninja Trader Needed

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

    milla gracia mrdude!

    Comment


      SuperTrend version that allows for selection of 27 different moving averages.

      The best futures trading community on the planet: futures trading, market news, trading charts, trading platforms, trading strategies

      Comment


        Harry,

        Do you have any financial incentive to refer us so many times to download indicators from big mike forum? It cost $50 to join the elite section and you always refer to the site when ask to help with an indicator.
        Just wonder.....

        Comment


          Originally posted by Tzachi View Post
          Harry,

          Do you have any financial incentive to refer us so many times to download indicators from big mike forum? It cost $50 to join the elite section and you always refer to the site when ask to help with an indicator.
          Just wonder.....
          I am a normal member of that forum. I have paid my elite membership fee two years ago, as everybody else did. I have no contractual relationship and in particular no financial relationship with Mike, who operates the forum.

          I have personally learnt a lot from other members of the forum. You will find more than 300 indicators for NinjaTrader (I have personally coded and posted about 70). The forum is more convenient for developing indicators than the NinjaTrader forum, as it is more a trading community than a beginner's forum.

          I am only refering to that forum, because I am not going to post the 70 indicators (and probably another 70 indicators somewhere posted in various threads) a second time. For many indicators, there are threads how to use them. Without those threads it is nearly impossible to understand some of the complex indicators, so even if I post them here, you would need to go there to find out the details.

          Furthermore, I have replied to various private messages and sent some of the indicators via e-mail (only those that I have coded).
          Last edited by Harry; 07-24-2012, 12:59 PM.

          Comment


            Thanks, MrDude, for attaching that Supertrend file.

            It looks really great on the charts. Your work on this is much appreciated.

            Comment


              TsSupertrend demo

              I installed the TsSupertrenddemo as posted by marcow, the problem I get is that I apply the strategy to a chart and it goes long when it should go short and vis versa?

              Any ideas?

              I attached a pic

              Thanks
              Attached Files

              Comment


                Did you happen to install an older -previously downloaded- version of SuperTrendDemo ?
                I'm asking because I updated the version in post #346 on 22/08/2011 because of the incorrect switching behaviour you are experiencing.

                please re-download and import the current version from post #346, and click "yes" if on import NT asks to overwrite existing strategies.

                let me know if it works.

                Marco

                Comment


                  Thanks marcow it works now. How do I get it to place an order when it crosses instead of when the bar closes and start of new bar? Also how would I go about adding an ATM strategy to this strategy?

                  Thanks Again

                  Comment


                    How do I get it to place an order when it crosses instead of when the bar closes and start of new bar?
                    while adding the strategy to a chart, in the strategy parameters window set Calculate On Bar Close (COBC) to "false".This will override the default value of "true" in the strategy code. With COBC = false, the indicator values will be calculated on verey incoming tick instead of at the end of each bar.

                    To make COBC = false default, you need to change the strategy code on line 41

                    from:
                    Code:
                     
                    CalculateOnBarClose = true;
                    to
                    Code:
                     
                    CalculateOnBarClose = false;

                    Also how would I go about adding an ATM strategy to this strategy?
                    sorry geotabs, don't have any experience with ATM strategies. Maybe other forum members do ?

                    Comment


                      Thanks marcow for the response, I did try the CalculateOnBarClose = false; and what it does is plots the TsSupertrend differently than if using CalculateOnBarClose = true; so if the last price has crossed with a chart that has the setting of CalculateOnBarClose = true; a chart that has CalculateOnBarClose = false; would be plotted way above current last price, I hope this is making sense? What I want is for the indicator to CalculateOnBarClose = true; but the order entry to trigger at the last price on chart so if last price is equal to the TsSupertrend then it will place order and not wait for bar close.
                      Is this possible?

                      Thanks Again

                      Comment


                        hello geotabs,

                        I understand that you want to run the indicator on COBC = true, but the strategy on COBC = false.
                        As far as I know this is not possible with a straight forward approach, because setting the strategy COBC = false will force COBC = false on all the indicators it is using.

                        However I use the following workaround:

                        set COBC = true in initialize of strategy
                        Code:
                         
                        CalculateOnBarClose = true;
                        and then put the strategy switching logic in the OnMarketData() method as follows:
                        (you should add this method in the code, below the default OnBarUpdate() method )

                        Code:
                         
                        protected override void OnMarketData(MarketDataEventArgs e) 
                        {
                         
                           if (e.MarketDataType == MarketDataType.Last)   // executes if incoming tick was a price change ( and not bid/ask change) 
                             {
                              // put code here to check if price is above/below   Supertrend indicator value. 
                             }
                        }
                        So now both strategy and indiactor are on COBC = true, but because strategy switching logic is in the OnMarketData() method the stratgey will behave like it is running on COBC = false.

                        I don't know your programming skills, so let me know if this works for you.

                        Marco

                        Comment


                          Thanks Marco

                          I don't have any programming skills, I did what you said and put the code in but am getting an error, I attached a picture showing the error.
                          Also how would I add an extra target or 2?

                          Thanks Again
                          Attached Files

                          Comment


                            What I want is for the indicator to CalculateOnBarClose = true; but the order entry to trigger at the last price on chart so if last price is equal to the TsSupertrend then it will place order and not wait for bar close.
                            geotabs,
                            after reading your request in post#400 again, I realize that what you want can surely be done, but it is kind of risky. Here's why.
                            Imagine the price crosses below the green supertrend line intrabar, and the strategy enters a short position. What if the price goes up in that same bar, and that bar closes above the green line, so Supertrend remains on a long position ? There will be no upper red line to reverse this short position to long. You get a mismatch between indicator and strategy. Or do you want to use the stoploss to exit this position ?

                            please find attached the strategy as you requested. You can also see here how the OnMarketData() method is correctly integrated in the code. Import by copying the attached file in your strategies directory (C:\Users\*****\Documents\NinjaTrader 7\bin\Custom\Strategy), and then compile in NT

                            Also how would I add an extra target or 2?
                            Do you mean that you have multiple entries, and want to set a unique profittarget for each entry ?
                            The strategy attached takes 3 entries, with a profittarget of 10,20 and 30 ticks.please take a look at the code on line 55,56,57,91,92,93,103,104,105. The trick is to give each entry a unique name, and use that name in its profittarget, so NT knows which PT belongs to each entry.


                            Let me know if the strategy does what you want, or if you have other ideas.

                            Marco
                            Attached Files

                            Comment


                              Thanks Marco,

                              I see where I went wrong on entering the code
                              What I need this strategy for is for tick and 1 min charts

                              As for profit targets:
                              What I want is for 1 entry and 3 profit targets, so if I go long 3 contracts take profit at 10,20 and 30 ticks or 5,10 and 15 ticks depending on what I trade. Also if I only trade 2 contracts would it just have 2 profit targets and so forth for 1 contract?

                              I can't thank you enough for all the help Marco

                              Cheers

                              Comment


                                I see where I went wrong on entering the code
                                understanding why it went wrong is the key to good programming

                                Yes, the strategy I posted has 3 entries. Entry_1 has a profittarget of 10, entry_2 has PT of 20 and entry_3 has PT of 30.
                                If you want to trade only 2 contracts, just comment out lines for the entries#3 (line 95 and 107) in the code. For 1 contract also comment out the entries#2 (I ussume you know how to comment out code do you ? just in case: put "//" in front of it so it turns green )

                                please find attached an updated version of the strategy, the stoploss for each entry didn't work correctly.

                                Marco
                                Attached Files

                                Comment

                                Latest Posts

                                Collapse

                                Topics Statistics Last Post
                                Started by jxs_xrj, 01-12-2020, 09:49 AM
                                6 responses
                                3,290 views
                                1 like
                                Last Post jgualdronc  
                                Started by Touch-Ups, Today, 10:36 AM
                                0 responses
                                7 views
                                0 likes
                                Last Post Touch-Ups  
                                Started by geddyisodin, 04-25-2024, 05:20 AM
                                8 responses
                                61 views
                                0 likes
                                Last Post NinjaTrader_Gaby  
                                Started by Option Whisperer, Today, 09:55 AM
                                0 responses
                                8 views
                                0 likes
                                Last Post Option Whisperer  
                                Started by halgo_boulder, 04-20-2024, 08:44 AM
                                2 responses
                                24 views
                                0 likes
                                Last Post halgo_boulder  
                                Working...
                                X