NexusFi: Find Your Edge


Home Menu

 





Calling on Advanced C# Ninja Coders -- to finish ClickTrade


Discussion in NinjaTrader

Updated
      Top Posters
    1. looks_one vantojo with 21 posts (2 thanks)
    2. looks_two decs0057 with 4 posts (3 thanks)
    3. looks_3 Mindset with 3 posts (1 thanks)
    4. looks_4 steve2222 with 2 posts (0 thanks)
    1. trending_up 12,118 views
    2. thumb_up 6 thanks given
    3. group 9 followers
    1. forum 37 posts
    2. attach_file 2 attachments




 
Search this Thread

Calling on Advanced C# Ninja Coders -- to finish ClickTrade

  #11 (permalink)
 vantojo 
Vilcabamba, Ecuador
 
Experience: Intermediate
Platform: Ninja
Trading: NQ, UB
Posts: 204 since Jul 2012

I started another thread more focused on the point

"How to use NTDirect.dll or NinjaTrader.Client in NinjaScript"

Started this thread Reply With Quote

Can you help answer these questions
from other members on NexusFi?
Are there any eval firms that allow you to sink to your …
Traders Hideout
Deepmoney LLM
Elite Quantitative GenAI/LLM
Futures True Range Report
The Elite Circle
NT7 Indicator Script Troubleshooting - Camarilla Pivots
NinjaTrader
NexusFi Journal Challenge - April 2024
Feedback and Announcements
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Get funded firms 2023/2024 - Any recommendations or word …
61 thanks
Funded Trader platforms
39 thanks
NexusFi site changelog and issues/problem reporting
26 thanks
Battlestations: Show us your trading desks!
26 thanks
The Program
18 thanks
  #12 (permalink)
 vantojo 
Vilcabamba, Ecuador
 
Experience: Intermediate
Platform: Ninja
Trading: NQ, UB
Posts: 204 since Jul 2012


decs0057 View Post
Order o = a.CreateOrder(Instrument,OrderAction.Buy,OrderType.Limit,TimeInForce.Day,quantity, (double)nudBuyLmtPr.Value,0,"","Buy");
o.Submit();

is undocumented NT functionality, this will send order but ATM is not attached


ok, that is a step in the right direction....but I need to submit an ATM

can this method also Close Positions and Cancel Pending Orders?

I started another thread for the NinjaTrader.Client and NTDirect interface. I believe those use the NT documented interface data structure, which allows ATM submittal.

Started this thread Reply With Quote
  #13 (permalink)
 
ratfink's Avatar
 ratfink 
Birmingham UK
Market Wizard
 
Experience: Intermediate
Platform: NinjaTrader
Broker: TST/Rithmic
Trading: YM/Gold
Posts: 3,633 since Dec 2012
Thanks Given: 17,423
Thanks Received: 8,425



vantojo View Post
ok, that is a step in the right direction....but I need to submit an ATM

I started another thread for the NinjaTrader.Client and NTDirect interface. I believe those use the NT documented interface data structure, which allows ATM submittal.

Only from another process, not from inside Ninja itself.

Travel Well
Visit my NexusFi Trade Journal Reply With Quote
  #14 (permalink)
 vantojo 
Vilcabamba, Ecuador
 
Experience: Intermediate
Platform: Ninja
Trading: NQ, UB
Posts: 204 since Jul 2012


ratfink View Post
Only from another process, not from inside Ninja itself.

There must be a way to do it, because ClickTrader here will do it, including submitting ATMs, Closing Positions, and Cancelling Pending Orders.

Tools and indicators for NinjaTrader

It is delivered as a DLL wrapped in an indicator, which can be imported into NT.

It works very well, but I need my own code so I can integrate the function into my other software. This requires customization that would be beyond the scope of the vender.

Started this thread Reply With Quote
  #15 (permalink)
 
ratfink's Avatar
 ratfink 
Birmingham UK
Market Wizard
 
Experience: Intermediate
Platform: NinjaTrader
Broker: TST/Rithmic
Trading: YM/Gold
Posts: 3,633 since Dec 2012
Thanks Given: 17,423
Thanks Received: 8,425


vantojo View Post
There must be a way to do it, because ClickTrader here will do it, including submitting ATMs, Closing Positions, and Cancelling Pending Orders.

I just mean the Ninja Client DLL is intended for use from another process.

Travel Well
Visit my NexusFi Trade Journal Reply With Quote
  #16 (permalink)
 steve2222 
Auckland, New Zealand
 
Experience: Beginner
Platform: Sierra Chart
Broker: AMP/CQG
Trading: Whatever moves in my timezone
Posts: 1,896 since Sep 2009
Thanks Given: 3,379
Thanks Received: 1,540


vantojo View Post
Can the Ninja Hotkeys know the price at a click on Charttrader?

It is NOT Ninja Hot Keys I use.

It is an external program called' AutoHotKeys' as mentioned in the threads I linked.

I can 100% vouch that it knows what price the cross hairs are at and I then press one key (that I assigned) to place various types of orders at that price. There is no reason why you cannot substitute my press of a key with the press of a mouse button.

As I said AutoHotKey can do anything you can do with typing on a keyboard or mouse controls.

It is an external program so you can write scripts for it to do any function on your computer that you can do with a keyboard and mouse.

Reply With Quote
  #17 (permalink)
 vantojo 
Vilcabamba, Ecuador
 
Experience: Intermediate
Platform: Ninja
Trading: NQ, UB
Posts: 204 since Jul 2012

I already have an external keyboard macro manager.

But I am going to integrate this click trader with my other indicators. I have developed a system of interdependent indicators that talk to each other via an indexed global array structure.

So, the click trade needs to know the state of a specific indexed item in this array structure inside of compiled C#, in an indicator that is not even on the chart. The array structure is hosted in an indicator executing in a Market Analyzer.

From this variable the click trade will make decisions.

I don't know how an external macro utility would be able to do that.

If you know how, please advise me.

Also, I want to avoid the right mouse click popup that happens when one clicks on the chart.....it distracts me even if it only flashes.

Started this thread Reply With Quote
  #18 (permalink)
 vantojo 
Vilcabamba, Ecuador
 
Experience: Intermediate
Platform: Ninja
Trading: NQ, UB
Posts: 204 since Jul 2012

I have received preliminary replies on the new thread.

The interface for C# trade management is in NinjaTrader.Core.dll, but it is undocumented and unsupported (by NT)

NinjaTrader.Client.dll and NTDirect.dll evidently only work from external applications, as far as I can tell there is no way to link them into the Ninja architecture because there are reference conflicts. (?)

Once I am able to find the correct NinjaTrader.Core command syntax I will be able to complete the indicator

Started this thread Reply With Quote
  #19 (permalink)
 
sam028's Avatar
 sam028 
Site Moderator
 
Posts: 3,765 since Jun 2009
Thanks Given: 3,825
Thanks Received: 4,629

If you're able to get the price, the easier is to send the information to a "sleeping" strategy which will take care of it.
You can use a named pipe (this is what I've done myself), but the easier is to use a kind of global variable (see for a nice example).

Success requires no deodorant! (Sun Tzu)
Follow me on Twitter Reply With Quote
  #20 (permalink)
 vantojo 
Vilcabamba, Ecuador
 
Experience: Intermediate
Platform: Ninja
Trading: NQ, UB
Posts: 204 since Jul 2012


Hi Sam,

I'm using global variables to pass order/cancel information from an indicator to a strategy in the Strategy Tab of Control Center. It is working really good for my automated trading.

But for this I want to use a different method because it is for manual trading and I don't always have the strategies enabled.


I did find the iObject documentation of data structure and methods for submitting, managing positions, and canceling orders. It is what Ninja calls "unmanaged". (I had not been aware of these methods, though I'm sure many more advanced coders are.)

Unfortunately with these methods I see no way to submit an ATM order.

Could you give me more information on pipes, if you have time?

OIF files will work fine, I think, but I don't really like them. I am thinking of having an external DLL which simply passes a command string to NinjaTrader.Core or NTDirect....not sure if that would work.

If I don't make any progress soon I will use OIF files, though there does seem to be a slight delay to their execution. Then later try the external dll approach.

(That is, unless there is a way to use iObject methods for ATM)

Thank you for your idea.

Started this thread Reply With Quote




Last Updated on February 5, 2015


© 2024 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 - Privacy Policy - Downloads - Top
no new posts