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,336 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

  #21 (permalink)
 decs0057 
Munich, Germany
 
Experience: Intermediate
Platform: NinjaTrader, TWS
Broker: IB, NinjaTrader Brokerage
Trading: ES,NQ,6E
Posts: 71 since Feb 2010
Thanks Given: 15
Thanks Received: 25

There is a class AtiServer with private static method ProcessOif

perhaps you can call it with reflection (I didn't test it)

using System.Reflection;
MethodInfo miProcessOif = typeof(NinjaTrader.Server.AtiServer).GetMethod( "ProcessOif", BindingFlags.Instance | BindingFlags.NonPublic );
if( miProcessOif != null )
{
object[] args = { commandStringOIF };
miProcessOif.Invoke( null, args );
}

Reply With Quote
Thanked by:

Can you help answer these questions
from other members on NexusFi?
Better Renko Gaps
The Elite Circle
Exit Strategy
NinjaTrader
Trade idea based off three indicators.
Traders Hideout
NT7 Indicator Script Troubleshooting - Camarilla Pivots
NinjaTrader
MC PL editor upgrade
MultiCharts
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Spoo-nalysis ES e-mini futures S&P 500
32 thanks
Just another trading journal: PA, Wyckoff & Trends
26 thanks
Tao te Trade: way of the WLD
24 thanks
Bigger Wins or Fewer Losses?
23 thanks
GFIs1 1 DAX trade per day journal
18 thanks
  #22 (permalink)
 vantojo 
Vilcabamba, Ecuador
 
Experience: Intermediate
Platform: Ninja
Trading: NQ, UB
Posts: 204 since Jul 2012


decs0057 View Post
There is a class AtiServer with private static method ProcessOif

perhaps you can call it with reflection (I didn't test it)

using System.Reflection;
MethodInfo miProcessOif = typeof(NinjaTrader.Server.AtiServer).GetMethod( "ProcessOif", BindingFlags.Instance | BindingFlags.NonPublic );
if( miProcessOif != null )
{
object[] args = { commandStringOIF };
miProcessOif.Invoke( null, args );
}

That looks interesting....an OIF without writing the file to the hard drive? That would be perfect.

I'm going to take a rest from this for a bit, I'll let you know how it works...

Thank you!

Started this thread Reply With Quote
  #23 (permalink)
 decs0057 
Munich, Germany
 
Experience: Intermediate
Platform: NinjaTrader, TWS
Broker: IB, NinjaTrader Brokerage
Trading: ES,NQ,6E
Posts: 71 since Feb 2010
Thanks Given: 15
Thanks Received: 25


it works, check ClickTrader update

Attached Files
Elite Membership required to download: ClickTrade.cs
Reply With Quote
Thanked by:
  #24 (permalink)
 vantojo 
Vilcabamba, Ecuador
 
Experience: Intermediate
Platform: Ninja
Trading: NQ, UB
Posts: 204 since Jul 2012


decs0057 View Post
it works, check ClickTrader update

Can't wait to try it!!!

Will have time this weekend....

THANK YOU....I don't have the knowledge yet to code at that level...

When I post the indicator I'll put your name/handle on it also, if it is OK?

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

Ok !!

It will submit an OIF order directly without writing the file to disk.

Only thing left is to click the ChartTrader Close button from code.

(not sure how to do that but should not be hard)

after that I will post the code to futures.io (formerly BMT) where others customize it to their own needs

Started this thread Reply With Quote
  #26 (permalink)
 decs0057 
Munich, Germany
 
Experience: Intermediate
Platform: NinjaTrader, TWS
Broker: IB, NinjaTrader Brokerage
Trading: ES,NQ,6E
Posts: 71 since Feb 2010
Thanks Given: 15
Thanks Received: 25

you can call Button.PerformClick-Method

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

I was expecting that to be more complicated... :-)

Ok, will post next week sometime...it will just be a template that has the basic functions mentioned

other coders can customize to their needs

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

OK, I'm showing my ignorance again.... :-)

This is not working...

System.Windows.Forms.Button CloseButton;

CloseButton = (Button)ChartControl.Controls["pnlChartTrader"].Controls["ctrChartTraderControl"].Controls["btnClose"];

CloseButton.PerformClick();

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

the code in this indicator to push the CLOSE button works



THANK YOU!


I have done initial testing against a live account with success and should be able to post this indicator after more testing.

PerformClick seems to not do anything, even though the button is referenced correctly.

Started this thread Reply With Quote
  #30 (permalink)
 mtaalamu 
San Diego, Calif. USA
 
Experience: Intermediate
Platform: ninja trader
Broker: Ninja Trader
Trading: futures
Frequency: Daily
Duration: Minutes
Posts: 33 since Oct 2011
Thanks Given: 11
Thanks Received: 19


Is that a Ninjascript? Can it be used for trading? If so, how?

Thanks
T

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