Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Passing price to Python

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

    Passing price to Python

    Hello,
    I have Ninja with live price feed from Rithmic, I want to pass live price to Python program that I'm developing.
    I see two ways for that:

    1.Copying price value every second to memory (Like Ctrl+C) then reading it with Python using paste from memory function , available in python.
    2.Writing price value every second to a text file, the reading it with Python.
    3.Maybe there is more easy way????

    Thanks

    #2
    Hello marwanco,

    "Copying price value every second to memory (Like Ctrl+C) then reading it with Python using paste from memory function , available in python."

    This would be out of the realm of what our support team is able to assist with.
    This thread will remain open for any community members that would like to provide unsupported code to achieve this.

    You can 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. The NinjaTrader Ecosystem has affiliate contacts who provide educational as well as consulting services. Please let me know if you would like a list of affiliate consultants who would be happy to create this script or any others at your request or provide one on one educational services.

    "Writing price value every second to a text file, the reading it with Python."

    This could be achieved with a C# StreamWriter. Just be sure to close the file after each read and write so another program can access it.

    Below is a link to the reference sample that demonstrates using a StreamWriter.
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      Thank You,
      Streamwriter did the job, working as expected.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by CarlTrading, 03-31-2026, 09:41 PM
      1 response
      43 views
      0 likes
      Last Post NinjaTrader_ChelseaB  
      Started by CarlTrading, 04-01-2026, 02:41 AM
      0 responses
      21 views
      0 likes
      Last Post CarlTrading  
      Started by CaptainJack, 03-31-2026, 11:44 PM
      0 responses
      30 views
      1 like
      Last Post CaptainJack  
      Started by CarlTrading, 03-30-2026, 11:51 AM
      0 responses
      50 views
      0 likes
      Last Post CarlTrading  
      Started by CarlTrading, 03-30-2026, 11:48 AM
      0 responses
      40 views
      0 likes
      Last Post CarlTrading  
      Working...
      X