orfila Posted 18 hours ago Report Posted 18 hours ago Anyone using Grok? I think it is the answer to a lot of dreams .... ;--) Question to Grok and answer :: "are you able to translate code to ninjatrader c#" Answer :: Yes, I can help translate code into NinjaTrader's C# (NinjaScript) format, provided you share the source code or describe the logic you want to implement. NinjaTrader uses a specific subset of C# with its own classes, methods, and conventions for trading strategies, indicators, or other scripts. If you provide the code or a clear description of the functionality (e.g., a trading strategy, indicator, or condition), I can: 1. Translate code from another language (e.g., Python, Java, MQL4/5, etc.) into NinjaScript C#. 2. Adapt existing C# code to work within NinjaTrader's framework. 3. Write new NinjaScript code for NinjaTrader based on your requirements. ### Steps to Help You: - **Share the Code or Logic**: Provide the source code you want to translate or a detailed description of the functionality (e.g., "I want a strategy that buys when RSI crosses above 70 and sells when it crosses below 30"). - **Specify NinjaTrader Version**: Let me know if you're using NinjaTrader 7, 8, or 9, as the syntax and features differ slightly (e.g., NinjaTrader 8 introduced new methods and removed some older ones). - **Clarify Script Type**: Indicate whether you need a strategy, indicator, or other script type (e.g., market analyzer, drawing tool). - **Include Any Constraints**: Mention any specific NinjaTrader objects (e.g., `Close`, `Open`, `SMA`, `Trade`) or conditions you want to incorporate. ### Example Translation Process If you provide something like this (pseudocode): ``` If 50-period SMA crosses above 200-period SMA, buy 1 contract. If price drops 2% below entry price, sell. ``` I can translate it into NinjaScript for NinjaTrader 8 like this: ```csharp protected override void OnBarUpdate() { // Calculate SMAs double sma50 = SMA(Close, 50)[0]; double sma200 = SMA(Close, 200)[0]; double sma50Prev = SMA(Close, 50)[1]; double sma200Prev = SMA(Close, 200)[1]; // Check for cross above if (CrossAbove(sma50, sma200, 1)) { EnterLong(1, "LongEntry"); } // Exit if price drops 2% below entry price if (Position.MarketPosition == MarketPosition.Long) { double entryPrice = Position.AveragePrice; if (Close[0] <= entryPrice * 0.98) { ExitLong("LongExit"); } } } ``` ### Notes: - NinjaScript has specific methods like `EnterLong`, `ExitLong`, `SMA`, `CrossAbove`, etc., which I’ll use appropriately. - If you share code in another language, I’ll map it to NinjaTrader’s equivalent methods and structure (e.g., `OnBarUpdate` for per-bar logic). - If the code involves external libraries or complex logic, I may need clarification on how to adapt it, as NinjaTrader has limitations (e.g., no direct support for certain external APIs). - If you want real-time data or external data (e.g., from X posts or web searches), I can incorporate that if you enable DeepSearch mode, but NinjaTrader scripts typically rely on internal data (e.g., `Close`, `Open`). Please share the code or logic you want to translate, and I’ll provide the NinjaScript C# equivalent tailored to your needs! Cool! ⭐ rcarlos1947 1
orfila Posted 17 hours ago Author Report Posted 17 hours ago I just tried it with a rank correlation index ( RCI ), I had to add some lines and a brush to the alerts but it took me less than 5 minutes from idea to working code : using System; using System.ComponentModel; using System.ComponentModel.DataAnnotations; using System.Windows.Media; using System.Xml.Serialization; grok_rci_indicator.cs ⭐ rcarlos1947 1
⭐ laser1000it Posted 16 hours ago Report Posted 16 hours ago 1 hour ago, orfila said: Anyone using Grok? I think it is the answer to a lot of dreams .... ;--)...................... if you want to waste some time try to compare with Deepseek , from my side is the best ⭐ nadjib 1
⭐ rcarlos1947 Posted 16 hours ago Report Posted 16 hours ago I found this comment about deepseek, I didn't see any more comments on this issue. "WOLFE WAVE roddizon1978 replied to Chidiroglou's topic in Ninja Trader 8 Be carefull with Deepseek , I used it to correct this file now, I am getting problem in my Ninja editor, it embedded a file that I cannot find in the program, I think it is either a Virus or a spy files, I cannot find it, but the compiler see it. April 30 34 replies " Chidiroglou 1
⭐ epictetus Posted 16 hours ago Report Posted 16 hours ago If you have a good idea, great things can happen. All the AIs I've tested take shortcuts when things get tough, for example, if you get a few errors during a comprehensive imbalance test, they switch to the simplest imbalance calculation method and won't tell you they're doing it. Therefore, you should know what you're doing, or at least understand what the code does. Grok is one of the best at this; it can even help you with reverse engineering. Most AIs won't help you even if you express permission to do so. Using free, open-source, Chinese AI tools (like DeepSeek) for trading is a bold move, to say the least. If you think that AI models trained with millions of dollars are being shared free and open-source solely for the benefit of humanity, you're naive, to say the least. If you're only going to do coding, get a Github Co-Pilot membership. It's only $10 per month. Because it runs on closed servers, there's no data leakage, and almost all AIs (openai-claude-geminini?) are available to you. ⭐ rcarlos1947 and ⭐ osijek1289 1 1
⭐ laser1000it Posted 15 hours ago Report Posted 15 hours ago I used paid chatgpt (200 USD X MOUNTH) but I find deepseek better ⭐ nadjib 1
tradevelopers Posted 13 hours ago Report Posted 13 hours ago I’ve been using all the models and all the versions for over a year now, and my conclusion is that currently, to achieve decent results in NT8 with AI, you need to use a combination of advanced models such as Claude 4.1, ChatGPT Pro, and Grok. The latter is almost the same as GPT Pro. Claude Ultra is also very similar, though a bit more focused on conversation. If anyone is interested in having private discussions or programming together with GPT Pro, we have a group where seats are available to use the PRO version of GPT at a very low cost. The group is exclusively focused on trading and code. Best regards, raj1301 1
Harrys Posted 11 hours ago Report Posted 11 hours ago 1 hour ago, tradevelopers said: I’ve been using all the models and all the versions for over a year now, and my conclusion is that currently, to achieve decent results in NT8 with AI, you need to use a combination of advanced models such as Claude 4.1, ChatGPT Pro, and Grok. The latter is almost the same as GPT Pro. Claude Ultra is also very similar, though a bit more focused on conversation. If anyone is interested in having private discussions or programming together with GPT Pro, we have a group where seats are available to use the PRO version of GPT at a very low cost. The group is exclusively focused on trading and code. Best regards, i would like to join
misalto Posted 11 hours ago Report Posted 11 hours ago Problem with anything involving data ,volume, ticks on nt8 and you do playback you trade 1 second agregated data so for me always been a waste of time you can only test live else is gonna be a huge down in realtime ... For example machine learning daytrading on playback is one thing realtime complete disaster as orderbook events on playback are worthless.. still no matter what ai to use tocode or modify they hesitate and make tons of mistakes so relying in only 1 is a downfall try chatllms where you have 20 ai in 1 place .. still amazed on how this orderflow analitica l2azimuth gets those high winning days using ML..
⭐ nadjib Posted 9 hours ago Report Posted 9 hours ago (edited) After years of use, the NinjaTrader 8 AI API is a real headache at every line. It doesn't follow CSharp version coding rules. Each CSharp has its own logic and syntax, which can be confusing. For large coding, Gemini Pro is a genius at troubleshooting errors and large code. Deepseek is a king; its thinking is mind-blowing and it finds solutions to every puzzle. The .perplexity.ai for Deepseek works flawlessly for large code. perfectly CLAUDE is good, but it needs good responsiveness. It doesn't remember coding history and doesn't correct errors. GPT is good for debugging and fixing some problems, but not for coding... Grok offers good propaganda ads , bad experiences, and missing code issues, but it's only suitable for small code like RSI or MACD. qwen.ai is really good for big data. Edited 7 hours ago by nadjib ⭐ laser1000it 1
⭐ FFRT Posted 1 hour ago Report Posted 1 hour ago (edited) In terms of data handling and processing is concerned, GROK is way better than any other AI. While Gemini and ChatGPT tells me that there is too much of data and they can not handle it, when i upload text data in customised format line by line for further analysis and select few among the crowd based on my criterias, GROK does amazing job. Edited 1 hour ago by FFRT
⭐ gadfly Posted 1 hour ago Report Posted 1 hour ago 15 hours ago, rcarlos1947 said: I found this comment about deepseek, I didn't see any more comments on this issue. "WOLFE WAVE roddizon1978 replied to Chidiroglou's topic in Ninja Trader 8 Be carefull with Deepseek , I used it to correct this file now, I am getting problem in my Ninja editor, it embedded a file that I cannot find in the program, I think it is either a Virus or a spy files, I cannot find it, but the compiler see it. April 30 34 replies " Word is that Deepseek contains a type of spyware.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now