Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

WillSpread Indicator

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

    WillSpread Indicator

    Can anyone code this indicator? The code here is in Genesis Trade Sense. I'm completely lost with C#.

    It takes a spread between two market symbols and creates a moving average type indicator. In this case, it shows when the ES is gaining on the 30 year bond. It would be great to have an input variable for the two symbols, so I could change them and use it on different markets.

    Thanks,
    John

    &Spread := (Close Of "ES-067" / Close Of "ZB-067") * 100
    &5EMA := MovingAvgX (&Spread , 5 , True)
    &20EMA := MovingAvgX (&Spread , 20 , True)
    &5EMA - &20EMA

    #2
    Hello JohnDev,
    Welcome to the forum.

    Unfortunately we do not do custom NinjaScript coding. I will leave the thread open for any forum member who might assist you.

    To develop your custom indicator/strategies you can also contact any of our independent NinjaScript consultants. You can get the list of our NinjaScript consultants from here http://www.ninjatrader.com/partners#...pt-Consultants
    JoydeepNinjaTrader Customer Service

    Comment


      #3
      I took a stab at this. Let me know if this is what you're looking for.


      EDIT: See post #8 for updated version
      Last edited by mrdude; 08-14-2012, 07:53 PM.

      Comment


        #4
        First of all, thanks for attempting this.

        I installed the indicator but couldn't get it to plot on my chart. I added "ZB 09/12" in the second instrument field and "ES 09/12" as my input series. In my list of indicators on my chart it gave me "WillSpread (ES 09/12 {1350 tick) (>Unknown<, >Unknown<, >Unknown<)

        Comment


          #5
          The input will have to be the identical text for the name of the instrument. I tested it out last night with currency pairs and it worked with $EURGBP as the input. When I get home tonight I'll play around with futures to see if it just needs a different format, though I'm not sure if I have any futures data to test with.

          Comment


            #6
            Originally posted by JohnDev View Post
            First of all, thanks for attempting this.

            I installed the indicator but couldn't get it to plot on my chart. I added "ZB 09/12" in the second instrument field and "ES 09/12" as my input series. In my list of indicators on my chart it gave me "WillSpread (ES 09/12 {1350 tick) (>Unknown<, >Unknown<, >Unknown<)
            If your symbol mapping is the same as mine then change ZB 09/12 to ZB 09-12.

            Comment


              #7
              Thanks, I tried that. No luck.

              Comment


                #8
                I was able to test this out with futures and it turns out that I needed to make a few changes to handle the input, but after the change it's working for me using ES 09-12 and ZB 09-12. As flyguy pointed out, the input will need to be in the format of ZB 09-12.



                Here's the updated version along with a screenshot of the indicator
                Attached Files
                Last edited by mrdude; 08-14-2012, 07:52 PM.

                Comment


                  #9
                  It looks correct on your chart but it won't plot on my end. I've attached a pic of my settings.

                  I'm brain dead at this point in the evening. I'll give it another try in the morning.

                  Thanks
                  Attached Files

                  Comment


                    #10
                    Sorry, wrong chart.
                    Attached Files

                    Comment


                      #11
                      Originally posted by mrdude View Post
                      I was able to test this out with futures and it turns out that I needed to make a few changes to handle the input, but after the change it's working for me using ES 09-12 and ZB 09-12. As flyguy pointed out, the input will need to be in the format of ZB 09-12.



                      Here's the updated version along with a screenshot of the indicator
                      mrdude,
                      Thanks for the WillSpread Ind. I tested your first version on about every combination of (min, ticks, range, contracts, and stocks that I trade) and it worked fine.
                      Last edited by flyguy767; 08-14-2012, 08:38 PM.

                      Comment


                        #12
                        From Control Center, click on the Log tab. Do you see an errors there?

                        It's possible that the indicator didn't update, so maybe deleting it and re-importing will help.

                        Comment


                          #13
                          Originally posted by JohnDev View Post
                          Sorry, wrong chart.
                          I noticed at SecondInstrument you have ZB 09-12 (4500 tick) when it should be just ZB 09-12.

                          Comment


                            #14
                            Ninja 7 will not allow import

                            Ninja 7 latest version keeps saying the file is probably corrupt and it cannot import WillSpread. Does anyone have any ideas?

                            Comment


                              #15
                              Hi Steadman,

                              Thanks for your post.

                              Please post a copy of the script you are attempting to import.
                              Chelsea B.NinjaTrader Customer Service

                              Comment

                              Latest Posts

                              Collapse

                              Topics Statistics Last Post
                              Started by michi08, 10-05-2018, 09:31 AM
                              3 responses
                              740 views
                              0 likes
                              Last Post NinjaTrader_ChelseaB  
                              Started by sightcareclickhere, Today, 01:55 PM
                              0 responses
                              1 view
                              0 likes
                              Last Post sightcareclickhere  
                              Started by Mindset, 05-06-2023, 09:03 PM
                              9 responses
                              258 views
                              0 likes
                              Last Post ender_wiggum  
                              Started by Mizzouman1, Today, 07:35 AM
                              4 responses
                              18 views
                              0 likes
                              Last Post Mizzouman1  
                              Started by philmg, Today, 01:17 PM
                              1 response
                              9 views
                              0 likes
                              Last Post NinjaTrader_ChristopherJ  
                              Working...
                              X