NexusFi: Find Your Edge


Home Menu

 





ninja code to cqg integrated client


Discussion in Traders Hideout

Updated
    1. trending_up 2,196 views
    2. thumb_up 0 thanks given
    3. group 2 followers
    1. forum 2 posts
    2. attach_file 0 attachments




 
Search this Thread
  #1 (permalink)
tdaprile
chicago
 
Posts: 1 since Mar 2018
Thanks Given: 0
Thanks Received: 0

is it possible to convert ninja code to cqg integrated client? Can you just copy and paste?


Reply With Quote

Can you help answer these questions
from other members on NexusFi?
Warsh Drops Easing Bias, December Hike Now Above 50% -- …
Prediction Markets & Event Contracts
Would a node-based workflow for automated trading be useful?
Traders Hideout
Czechia Live at 52.5% as England Rides 4-2 Wave to Co-Fa …
Prediction Markets & Event Contracts
Trump Media to sell instant access to market-moving soci …
Traders Hideout
Datafeed for Atas
Platforms and Indicators
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Want your NinjaTrader indicator created, free?
5 thanks
Denied 20K payouts: Alpha Futures
1 thanks
FootPrintV2 Chart for NT8
1 thanks
BERN ALGOS algo trading journal
1 thanks
Afternoon-close session
1 thanks
  #3 (permalink)
 iantg 
charlotte nc
 
Experience: Advanced
Platform: My Own System
Posts: 409 since Jan 2015
Thanks Given: 91
Thanks Received: 1,154


A cursory glance at the API overview reviles that you can at least use the same programming language as ninja trader which is c#.

Client APIs | CQG, Inc. "The CQG Data API is based on Microsoft COM server technology. Any language that supports COM automation technology may be used for development. CQG provides samples of how to use the API for Microsoft Excel® VBA, Visual Basic, C#, and C++."

What this means is that if you want to convert your ninjatrader code to cqg API you could at least keep any part of the code that is outside the realm of the ninjascrpt custom class library intact. But the key point is that most of the ninjatrader classes such as "Exit Long" https://ninjatrader.com/support/helpGuides/nt8/en-us/?exitlong.htm will have a different syntax with cqg API. If your code is 90% or more based on the ninjatrader library, then you will have to manually find the equivalent to each of these methods and objects in cqg API. If you are doing things with c# that are beyond just calling ninjatrader objects like building custom lists, arrays, making calls to a sql server, etc. These pieces you can likely keep relatively unchanged. But the rest (NinjaTrader class library parts) you will have to find the equivalent cqg API object / method / class, etc. and convert it. Some of these may be as simple as just finding out what the equivalent in cqg is to Exit Long, but others may require more steps or an entirely different bit of logic. Unfortunately there is no easy button here...

So there is the long answer as well.

Best of luck!

Ian


In the analytical world there is no such thing as art, there is only the science you know and the science you don't know. Characterizing the science you don't know as "art" is a fools game.
Visit my NexusFi Trade Journal Reply With Quote




Last Updated on March 18, 2018


© 2026 NexusFi®, s.a., All Rights Reserved.
Av Ricardo J. Alfaro, Century Tower, Panama City, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada)
All information is for educational use only and is not investment advice. There is a substantial risk of loss in trading commodity futures, stocks, options and foreign exchange products. Past performance is not indicative of future results.
About Us - Contact Us - Site Rules, Acceptable Use, and Terms and Conditions - Downloads - Top
no new posts