anyone?
the following apply to "how to" do in Ninjascript in an Indicator
1) how to press the ChartTrader Close Button?
2) How to get the selected Account from ChartTrader?
3) How to submit an order from NinjaScript?
I don't want to use the Right Click ChartTrader, it is too cumbersome for scalping....my NT7 code submits Limit Orders with one click at the mouse pointer.
================================================== ================================================== ========
This last one in NT7 I had to use an OIF submission because there was no way to submit an order from Indicator Script. An OIF file is slow....there was some code on Big Mike Trading I used to bypass writing the OIF file to disk and it worked great. Is there anything like this in NT8? (Yes, I know it is not supported, but perhaps one of the smart C# guys can tell me?)
// from BigMikeTrading.vvMiniTradePanel
[DllImport("user32.dll")]
public static extern int SendMessage(IntPtr hWnd, int wMsg, IntPtr wParam, IntPtr lParam);
region SubmitOIF
private void SubmitOIF()
{
// this will only be for a set price ctl left mouse or shft left mouse
// other submissions by Hot Key
submittedFrom = SubmitType.SetPrice;
// Code provided by user BigMikeTrading.decs0057
NinjaTrader.Server.AtiServer atiServer = NinjaTrader.Cbi.Globals.AtiServer;
MethodInfo miProcessOif = typeof(NinjaTrader.Server.AtiServer).GetMethod( "ProcessOif", BindingFlags.Instance | BindingFlags.NonPublic | BindingFlags.Static );
if( miProcessOif != null )
{
object[] args = { OIF_Command };
try
{
miProcessOif.Invoke( null, args );
}
catch (Exception ex)
{
msg = ("SubmitOIF Exception = " + ex );
Print (msg);
}
}
msg =
Environment.NewLine +
Common.DashLine +
Environment.NewLine +
OIF_Command +
Environment.NewLine +
Common.DashLine;
Print (msg);
}
#endregion
================================================== ================================================== ========
Thanks

Comment