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 algospoke, 04-17-2024, 06:40 PM
    6 responses
    48 views
    0 likes
    Last Post algospoke  
    Started by arvidvanstaey, Today, 02:19 PM
    4 responses
    11 views
    0 likes
    Last Post arvidvanstaey  
    Started by samish18, 04-17-2024, 08:57 AM
    16 responses
    61 views
    0 likes
    Last Post samish18  
    Started by jordanq2, Today, 03:10 PM
    2 responses
    9 views
    0 likes
    Last Post jordanq2  
    Started by traderqz, Today, 12:06 AM
    10 responses
    19 views
    0 likes
    Last Post traderqz  
    Working...
    X