Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

AddOn to Read Support / Resistance Data from File and Plot to all Charts

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

    AddOn to Read Support / Resistance Data from File and Plot to all Charts

    Hi,

    I was wondering if this is suitable for an AddOn.....

    Goal is to have a CSV file with various prices and a definition of what that price is (support, resistance, entry point, exit etc....) and for this data to be read and stored within a list, array etc... and made available from a central point so can be loaded to charts through an indicator.

    I have this working as an indicator which reads the file and then plots as horizontal lines across the charts (if the prices are for the instrument instrument on that chart) but I think it is over engineered. Idea is it would make more sense for the file to be read once and the data made available to all charts so it can then be plotted through an indicator rather than each chart reading the file (as the file is read each time there is an update to it).

    Does this sound suitable for an AddOn? If so any guidance on where would be the right place to start? (or if not suitable for an AddOn other functionality within NinjaTrader which may work) Had a look through the AddOn documentation and examples but they seem to be more focused on creating additional windows, menu items etc...

    Thanks!

    #2
    Hello,

    Thank you for the question.

    For this item, depending on what calculations you need to do it may or may not work as an Addon. The addons would not run through OnBarUpdate and the other states as an indicator does, so in the case this requires OBU or other indicator methods you may have difficulties in making it into an addon. The best way to find out would be to start migrating the code and see if you cant use something that you are, if everything is usable it should be a easy transition.

    For this you could likely use a Static class in an addon to provide a general way to pull that data into a script.

    I composed this sample for another use but the same theory applies, instead of a double you could use any types you need in the static class or any logic like loading from file.

    The sample installs a Indicator and Strategy that both use a static variable, the indicator sets the variable as the strategy calls the indicator and then the strategy reads the set variable.

    I look forward to being of further assistance.
    Attached Files
    JesseNinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by mattbsea, Today, 05:44 PM
    0 responses
    4 views
    0 likes
    Last Post mattbsea  
    Started by RideMe, 04-07-2024, 04:54 PM
    6 responses
    31 views
    0 likes
    Last Post RideMe
    by RideMe
     
    Started by tkaboris, Today, 05:13 PM
    0 responses
    2 views
    0 likes
    Last Post tkaboris  
    Started by GussJ, 03-04-2020, 03:11 PM
    16 responses
    3,282 views
    0 likes
    Last Post Leafcutter  
    Started by WHICKED, Today, 12:45 PM
    2 responses
    20 views
    0 likes
    Last Post WHICKED
    by WHICKED
     
    Working...
    X