• 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

Add On Website data stream, automatically update Margin Requirements

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

    Add On Website data stream, automatically update Margin Requirements

    The goal is to download the streaming data from https://www.forex.com/en-us/support/...ip-calculator/ with ALL being selected. This would give me access to the Margin requirements at any given moment. This would provide the input data that needs to be tracked and analyses. This step will allow me to automatically update MyRiskTemplate with up to date data (time stamped) it can determine the max margin required in the past blank amount of updates. This would provide the Risk template with the data needed to update hurtle rate in the account being traded.

    Big picture some of the base components to do this is already available in NinjaTrader 8 but I am missing on how to get up to date data from https://www.forex.com/en-us/support/...ip-calculator/

    any help would be appreciated

    #2
    Looks like you'll have to download 1-2 json files with something like
    https://docs.microsoft.com/en-us/dot...tframework-4.8
    parse them, merge the sets, and do minor calculations and you are done. Simple as that.
    Most likely the MinLeverage property aka Margin% will be enough.
    Attached Files
    Last edited by MojoJojo; 04-08-2020, 02:12 AM.

    Comment


      #3
      Hello GTBrooks,

      If that site offers some kind of API you could look into using that. What MojoJojo has pictured is the page's web requests which may be able to be used to collect their internal urls which that site uses however those may change and you would also likely need to process the data. You can refer to the site you linked and email their support to see if they have some kind of way to access their data that you can use, otherwise if you can find the data you need and have a way to access it you could certainly look for ways to gather that data from C#.

      You would be best off searching online in general for how to access that data depending on what you end up with. If they provide the data as files or if you access the raw data as mojojojo implied you could likely parse the files in a C# way. An example google search could be "C# download and parse json file" which will provide some examples which could then be used in your addon. If they have some kind of web api you could search online for C# tutorials related to that type of api access in C#.

      NinjaScript is simply C# 4.5 so you can execute any C# tasks from within your addon to collect or parse the data, it really just depends on what format that data is in and what is required to access it.

      Please let me know if I may be of additional assistance.
      JesseNinjaTrader Customer Service

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by RogerLin, Today, 01:20 AM
      2 responses
      20 views
      0 likes
      Last Post NinjaTrader_Marco  
      Started by grayfrog, Yesterday, 09:29 PM
      1 response
      11 views
      0 likes
      Last Post NinjaTrader_Marco  
      Started by TheNomadicAspie, Yesterday, 12:07 PM
      1 response
      12 views
      0 likes
      Last Post NinjaTrader_Marco  
      Started by b16_aln, Today, 02:35 AM
      0 responses
      10 views
      0 likes
      Last Post b16_aln
      by b16_aln
       
      Started by iTrade777, Today, 02:19 AM
      0 responses
      8 views
      0 likes
      Last Post iTrade777  
      Working...
      X