NexusFi: Find Your Edge


Home Menu

 





Replay Control Center programmatically


Discussion in NinjaTrader

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




 
Search this Thread

Replay Control Center programmatically

  #1 (permalink)
 
grankus's Avatar
 grankus 
Barcelona
 
Experience: Beginner
Platform: NinjaTrader 7
Trading: CL, TF
Posts: 8 since Aug 2012
Thanks Given: 5
Thanks Received: 0

Hi!

I’m trying to control the Replay Control Center programmatically and other NinjaTrader internal items.
I have discovered that using .NET Reflector and Reflexil, you can get the all the internal items NinjaTrader, so in theory using “System.Reflection”, you can reach all the internal NT items.

First of all I’d like to use the “GoTo(DateTime newDate)” method inside the “NinjaTrader.Core.dll” that I want to include in a Strategy (I don’t know if this it’s possible or not)

This is what I have right now:

 
Code
public void Test()
{
				
object[] arguments = new object[What DateTime format?];
				
Assembly assembly = Assembly.LoadFrom("NinjaTrader.Core.dll");
object mc =assembly.CreateInstance("NinjaTrader.Data.ReplayControlCenter");
Type t = mc.GetType(); 
BindingFlags bf = BindingFlags.Instance |  BindingFlags.NonPublic;
MethodInfo mi = t.GetMethod("GoTo", bf);
mi.Invoke(mc, arguments);
				
}
And I get this error:


Quoting 
**NT** Error on calling 'OnBarUpdate' method for strategy 'ST44/258f8d75debc46a8adc8c61eceadf3ec': Parameter count mismatch.

I tried different DateTime formats, without success.

Unfortunatelly I don’t have the skill to solve this right know but I’m learning little by little.

Started this thread Reply With Quote




Last Updated on March 3, 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