Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Atomated Reload of the strategy

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

    Atomated Reload of the strategy

    I am facing a strange situation with the execution of my strategy.

    Hi,

    I am using a Trend indicator to determine the trend at the end of every candle. In that way, the indicator draw a blue dot in bulls condition or a yellow dot in bear condition.

    E.g: The strategy run in real time showing a blue dot on bar close. However, if I reload the strategy the result change and I get the opposite.

    As the reloaded result is more accurate, I would like to know,

    - if I there will be any problem with NT if I request to reload the strategy at the end of every candle
    - How can I do that through the strategy builder?

    Estrategy conditions:
    - Data Series: 60 min
    - Only one trend indicator showing blue or yellow dots
    - OnBarClose = True
    - Data: Kinetick
    - Broker: IB

    Best regards

    #2
    Welcome to our forums oppunzano - so Kinetick would be here the first connection in your setup?

    An automated strategy reload on every bar would be unfortunately not possible natively through NinjaScript - via C# coding forum members here have had success using the SendKeys method to 'push' the F5 command via a script to reload the respective NinjaScript's on the chart.
    BertrandNinjaTrader Customer Service

    Comment


      #3
      Thanks for the answer!

      Yes, Kinetick is my first connection.
      Related to the different performance of th indicator in real time or historical data. Do you have any explanation?
      If I have OnBarClose = True, shouldn't the system calculate with OHLC for that bar?
      Is there any way to oblige the system to use the same approach OHLC in real time?

      Comment


        #4
        oppunzano, thanks for the reply. Does the trend indicator you use call any other methods / indicators in it's calculation that would have potentially CalculateOnBarClose set in their Initialize() methods? Is this a single or MultiSeries study you run on the 60 min chart?

        What also needs to be factored in, is that reloaded data from a server could be slightly having a different tick formation than realtime received / processed ticks.
        BertrandNinjaTrader Customer Service

        Comment


          #5
          Thanks again.
          I am not the indicator developer and I am not an expert in C# but I think the indicator is using other indicators as ATR. The indiator can be defined OnBarClose = True or False. By default is TRUE.
          Furthermore, it uses two time series:
          - Main = 60 m = estrategy bar
          - Secondary = 20m
          Another point that I would like to mention is that the indicator shows results in data box as follow,
          - Uptrend = 20 > 0 + Downtrend = NA means blue dot in my strategy
          - Uptrend = NA + Downtrend = 20 >0 means yellow dot in my strategy
          - Uptrend = 20 >0 + Downtrend =20 >0 mens blue or yellow dot in my strategy depending on the data provided. If I use historical data or I reload the strategy one minute after it closed it is blue but if I use real data it is yellow.
          Maybe is crazy what I am telling you but
          - It is possible to have a data series for the estrategy and another for the indicator. I mean I run the strategy under 61m and the indicator under 59m/20m.
          - Do you think this would help to simulate a reload of the strategy?

          Comment


            #6
            oppunzano, thanks - hard to comment without seeing the logic at work for determining the signals. I think the best would be directly contacting the author / developer of the study to ask for clarification and his thoughts. In a MultiSeries strategy, you could add the 59 minute timeframe for example in as well and then have the indicator calculated on this series instead - however I'm unsure if it would help with your issue, since I would expect the reload concerns to manifest on the 2 min shorter series as well if it's a general issue in the code.
            BertrandNinjaTrader Customer Service

            Comment


              #7
              Thanks for your support!
              I will contact the developer to know if he has an explanation.
              In any case, it is not clear for me why the same indicator shows different outputs if I use the indicator in the chart or I got it from the strategy. I think this is more related to NT than the indicator. Isn't it?

              Comment


                #8
                To comment further, we would need to be able to test the setup here and look into more detailed - if this is an option, please contact us directly with the script at support at ninjatrader dot com.
                BertrandNinjaTrader Customer Service

                Comment


                  #9
                  While I wait for the develper's answer, I would like to know somthing else.
                  As the results seems to be different between the historical and real data working with bar minutes, I wonder if the issue would be solved if I work with tick charts. What do you think? Shall I try to spend my time checking this point?

                  Comment


                    #10
                    Sorry would not be able to comment, it might be worth a try. If it's a general code issue though I would not expect it to act differently on tick based types.
                    BertrandNinjaTrader Customer Service

                    Comment


                      #11
                      Hi again,

                      The developer of the indicator detected one error about the code and he solved the issue.

                      As I developed the strategy, he can not tell me more about though he is interested on the issue.

                      In that way, I would like your help with this issue. Could you please do it?

                      I send you my strategy to check if the problem of the different results with historical data or real data is generated by NT or by the indicator.

                      As you can see is a very basic strategy generated by the strategy builder with market orders. I am learning at the moment.

                      Thanks for your support!
                      Attached Files

                      Comment


                        #12
                        oppunzano, would surely give it a run here for you - but unfortunately not possible without the custom trend indicator you call. If you could forward that to be at support at ninjatrader dot com that would be great for testing this issue.
                        BertrandNinjaTrader Customer Service

                        Comment


                          #13
                          I didn't think about it. Sorry!

                          Now, I have a situation because of the indicator trade rights. I would need to request for permission to do that. I will let you know.
                          Thanks again!

                          Comment


                            #14
                            Sure, but first you also could give that same strategy a run to see if the changed indicator code used produced more consistency for you.
                            BertrandNinjaTrader Customer Service

                            Comment


                              #15
                              Yes. I did.
                              I detected some issues that I sent to the developer:
                              - the strategy and the indicator do not always match in real time
                              - after reloading the strategy they match again
                              - after few minutes, I reload the strategy again and both match but the trend has change
                              Well, the stability of the indicator is not big

                              Comment

                              Latest Posts

                              Collapse

                              Topics Statistics Last Post
                              Started by judysamnt7, 03-13-2023, 09:11 AM
                              4 responses
                              57 views
                              0 likes
                              Last Post DynamicTest  
                              Started by ScottWalsh, Today, 06:52 PM
                              4 responses
                              36 views
                              0 likes
                              Last Post ScottWalsh  
                              Started by olisav57, Today, 07:39 PM
                              0 responses
                              7 views
                              0 likes
                              Last Post olisav57  
                              Started by trilliantrader, Today, 03:01 PM
                              2 responses
                              20 views
                              0 likes
                              Last Post helpwanted  
                              Started by cre8able, Today, 07:24 PM
                              0 responses
                              9 views
                              0 likes
                              Last Post cre8able  
                              Working...
                              X