• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Custom Series Difference% to trade

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

    Custom Series Difference% to trade

    Hi All

    i need help in plotting a chart of difference % on chart for /CL-/NG. Also once I plot the difference should be able to place orders using an automated strategy. Example when the difference percentage started positive long /Cl . If it is Negative Short /Ng

    is is it possible ? If it is not related to this topic please move or suggest appropriate category

    thanks
    suresh

    #2
    Hello 2shureshk,

    Thank you for your note.

    While what you ask is possible, it might not be particularly useful, depending on the instrument pairs you choose. Those two particular instruments (CL and NG) trade at very different prices. If you're just comparing one to the other, the percentage difference wouldn't ever drop below zero, most likely. That being said, there are a number of indicators currently available that would allow you to chart the spread between two instruments (not necessarily by percentage, though). You can check those out on our User App Share here:

    https://ninjatraderecosystem.com/user-app-share/

    I notice you've asked several times in the forums requesting code for similar sounding strategies - please note that while we can sometimes assist with example scripts, in the support department at NinjaTrader we do not create, debug, or modify code for our clients. This is so that we can maintain a high level of service for all of our clients as well as our partners.

    We've given you code samples previously that would apply here:

    https://ninjatrader.com/support/foru...wo-instruments
    https://ninjatrader.com/support/foru...ategy-analysis
    https://ninjatrader.com/support/foru...namic-variable

    You can use these as a reference to create a strategy as you've asked.

    For example, should you want the percentage of the spread you could modify one of those examples to use this logic in OnBarUpdate():

    //Get difference between the primary and secondary series
    double spread = Closes[0][0] - Closes[1][0];

    //calculate what percent the spread is of the primary dataseries' price
    double percentSpread = ((spread / Closes[0][0])*100);

    Additionally, you may also contact a professional NinjaScript Consultant who would be eager to create or modify this script at your request or assist you with your script. If you would like, I can have our Platform Sales team follow up with you with a list of professional NinjaScript Consultants who would be happy to create or assist you with this script or any others at your request.

    Please let us know if we may be of further assistance to you.
    Kate W.NinjaTrader Customer Service

    Comment


      #3
      Thank you for the info. I have been looking for this info for a long time . As you said help is available but it is not really useful to develop the logic even after studying with high technical skills with some programming knowledge. If there are basic code examples available that would have been more helpful rather than theory , which is not an easy way to develop.

      I am willing to know about the programmer services to see if I can achieve my requirements. It will be an info call or discussion to find service and pricing. I
      I might not be taking the set ice, if I am not comfortable with service/price after discussion.

      please share the contact email or let me know the secure area to share my contact info

      thanks

      Comment


        #4
        Hello 2sureshk,

        Thank you for your reply.

        Please write into to PlatformSales[AT]NinjaTrader[DOT]Com directly to reach our Sales team. They can point you towards Ninjascript Consultants who would be happy to assist you.

        Please let us know if we may be of further assistance to you.
        Kate W.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by kitwit, Today, 09:47 AM
        0 responses
        5 views
        0 likes
        Last Post kitwit
        by kitwit
         
        Started by vantojo, Today, 08:35 AM
        1 response
        7 views
        0 likes
        Last Post NinjaTrader_PatrickG  
        Started by frankduc, Today, 08:28 AM
        1 response
        9 views
        0 likes
        Last Post NinjaTrader_Jim  
        Started by EddieBeanPit, 06-21-2019, 07:17 PM
        1 response
        20 views
        0 likes
        Last Post NinjaTrader_Jesse  
        Started by futures2018!, Yesterday, 05:01 PM
        3 responses
        15 views
        0 likes
        Last Post NinjaTrader_Jesse  
        Working...
        X