Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Belkhayate Cog

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

    Belkhayate Cog

    I'm trying to set-up an MA crossover strategy with entry and exit using belkhayate cog indicator, however the ninjatrader strategy is not recognizing this and giving me really weird results. I can successfully set-up MA crossover strategies, so I'm not sure why this isn't working. Any suggestions?

    #2
    Hello Evergreencat,

    Welcome to the NinjaTrader forums!

    Some indicators are not designed to be called from another script (such as ones that do visual rendering only) or may have mistakes that prevent them from being properly called.

    Does this custom indicator have a plot being set?
    If the indicator is added directly to a chart do you see plots in the Plots section of the parameters?
    Do you see a plot being set on the chart that has values appearing in the DataBox window?
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      Thank you for your reply Chelsea. This does allow me to select the various standard deviation lines in a value plot. If I add the indicator directly to the chart I do see the plots in the plots section of the parameters. I also see values (the market price) for each line on the right side of the chart. If it helps I am using the Belkhyate-Cog indicator that is available in the User App Share ecosystem. I posted a link to the indicator below. Thank you for looking into this!
      Hey guys this is the Belkhayate COG (Center of Gravity) indicator. Or also known as a polynomial regression channel with 3 std deviations. I transported this code directly from here. If anybody has any useful information regarding the usability of the indicator I'd appreciate the feedback. The fact that it repaints takes a lot away […]

      Comment


        #4
        Hello Evergreencat,

        If there are plots, these should be available to the strategy.

        Which plot from this indicator are you using?

        If you print that plot value to the output window does this match the value in the DataBox from the chart?

        Below is a link to a forum post that demonstrates using prints to understand behavior.
        https://ninjatrader.com/support/foru...121#post791121
        Chelsea B.NinjaTrader Customer Service

        Comment


          #5
          Hi Chelsea - I reviewed the youtube video you sent me and it was very helpful. I printed to the output window but the only thing I could see was the MA information. I think the problem is that the individual plots are not being recognized in the strategy builder. I am wanting to use plots sql3 and sqh3 with a MA. Unfortunately I am not proficient enough in ninjascript to code this properly. Any suggestions?

          Comment


            #6
            Hello Evergreencat,

            May I have a screenshot the Strategy Builder > Condition Builder showing the plot selected?

            May I also have a screenshot of the chart with the DataBox open and the mouse placed on the bar in question?

            Last, may I have the output from the NinjaScript Output window?
            Chelsea B.NinjaTrader Customer Service

            Comment


              #7
              Hi Chelsea - Here are the attachments you requested. For some reason the mouse is not showing up in the screenshot, but the lines are color coded and should be easy to spot. Please let me know if there is anything else you need. Thank you!
              Attached Files

              Comment


                #8
                Hello Evergreencat,

                Thank you for the screenshots, we have a value of 3068.03 for the SQL3 plot on 6/18 at 9:33:06.

                We want to match this up with the print in the output, however the indicator is not being printed in the output.

                May I have you add the value of the indicator sql3 plot to the print? (In the print click set and select the indicator and this plot)
                Then re-run this and please post the output with your next post.
                Chelsea B.NinjaTrader Customer Service

                Comment


                  #9
                  Chelsea - Thanks again for the awesome support. Here is the output that includes the sql3 indicator. I have also attached a couple of screenshots to show you how I set up the print. I hope this helps. Thank you!
                  Attached Files

                  Comment


                    #10
                    Hello Evergreencat,

                    As a tip, prints can be added in the Strategy Builder.
                    Please watch the video from the link I have provided labelled 'Below is a link to a video on 'Debugging using prints with the Strategy Builder''.

                    I see you are printing the previous bars value of the indicator and it doesn't appear you are printing the sql3 plot.

                    As an example the MACD has 3 plots, the MACD plot, the Avg plot, and the Diff plot.

                    If I wanted to print the diff plot I would print:
                    Print( MACD(12, 26, 9).Diff[0] );

                    Print the plot value from the indicator that you are wanting the value from.
                    Chelsea B.NinjaTrader Customer Service

                    Comment


                      #11
                      Hi Chelsea - I completed the print, unfortunately the zip file is 1.01 MB and it won't let me attach it to the message. Any suggestions on how to send it? I appreciate your patience and helping me figure this out. Thank you!

                      Comment


                        #12
                        Hi Chelsea - Nevermind - I just reduced the time period of the print so now it works. Sorry for the hassle. Hopefully this is what you are looking for. Printing from the Ninjatrader strategy is way easier!. I did review the data and I couldn't find anything that shows a crossover and why it is not happening. I'm hoping you have better luck. This rookie certainly appreciates your patience. Please let me know if you need additional information. Thank you!
                        Attached Files

                        Comment


                          #13
                          Hi Chelsea - Good news, I was able to figure out the problem. I really appreciate your help and I certainly learned a lot more about the strategy builder. Unfortunately, I found out this indicator doesn't really work for what I need. Thank you for everything.

                          Comment


                            #14
                            Evergreencat, can I ask what you ended up figuring out about the problem with the plots? This is the same issue I am having. The plots don't seem to be recognized correctly in a strategy when I call them up. It doesn't match the crossover that is in fact on the screen. Any ideas?

                            Comment


                              #15
                              Hi TomTownsend,
                              The issue with the Belkhayate COG indicator is that it recalculates / repaints like crazy. Thus, what you see on the chart NOW for closed periods is not what the Belkhayate COG indicator was real-time at a given point in time facturing in the data that was available up until that point in time. The difference can be huge. You will only be able to figure how massive the difference can be, if you keep track of what the indicator really was real-time (not yet knowing the future) and then compare it to what is now being calculated with hindsight for the past.
                              In the attached, dots are what the indicator did real-time, lines reflect repainted past using the exact same settings. I hope this is as eye-opening for you as it was for me.
                              NT-Roland
                              Attached Files

                              Comment

                              Latest Posts

                              Collapse

                              Topics Statistics Last Post
                              Started by muratb35, Today, 03:36 AM
                              0 responses
                              3 views
                              0 likes
                              Last Post muratb35  
                              Started by fernlicht, Today, 02:16 AM
                              1 response
                              8 views
                              0 likes
                              Last Post NT-Roland  
                              Started by fernlicht, 04-12-2021, 06:01 PM
                              1 response
                              28 views
                              0 likes
                              Last Post NinjaTrader_PaulH  
                              Started by memonolog, Today, 02:10 AM
                              2 responses
                              4 views
                              0 likes
                              Last Post NT-Roland  
                              Started by orenytz, Today, 12:25 AM
                              0 responses
                              8 views
                              0 likes
                              Last Post orenytz
                              by orenytz
                               
                              Working...
                              X