Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
How to Compare & Alert when Different Contracts Volume Change?
Collapse
X
-
How to Compare & Alert when Different Contracts Volume Change?
I want to be able to use Market Analyzer in NT7_Beta18 to Compare the Volume of two different Contact Months (ex. Compare ES 09-10 with ES 12-10) and Alert me with both Audio & Visual Alerts when the Forward Month Volume (ES 12-10) becomes Greater than the Current Month (ES 09-10). Can someone Please tell me if this can be done and if so, Specifically how to do this?Tags: None
-
Hello JMCA2000,
Welcome to the NinjaTrader forums!
Unfortunately there's no way this can be setup in the market analyzer. Alerts can only test for value changes for one row, and you'd like to make comparisons across multiple rows. (multiple instruments)
See here for more information on alerts in the market analyzer.Ryan M.NinjaTrader Customer Service
-
Hi MXASJ,
Thank you for your reply.
I tried creating this with the Strategy Wizard but I could not do it. I don't know where to select the instruments to compare and I'm not sure on how to build the Test Condition using Inst1 = Front Month etc. I understand your if statement, but can not create this because there's no example like this in the Help Manual.
Would it be asking to much if you could PLEASE Create this for me as an example (Compare ES 09-10 with ES 12-10) so I have something to go by? I don't even know where I would run this Strategy from the background only, for this example and the other nine instruments I compare.
Thank You for Considering doing this.
Comment
-
You can't create multi instrument strats with the Wizard I believe. Here are some basic guts to work with:
PHP Code:/// <summary>
/// Multi-Instrument sample strategy.
/// </summary>
[Description("Multi-Instrument sample strategy.")]
public class SampleMultiInstrumentMod : Strategy
{
// Variables
protected override void Initialize()
{
Add("ES 12-10", PeriodType.Day, 1);
CalculateOnBarClose = true;
}
protected override void OnBarUpdate()
{
if (Volumes[0][0] > Volumes[1][0])
{
Print(DateTime.Now + " Greater Volume is in the ES 09-10 Contract");
}
if (Volumes[0][0] < Volumes[1][0])
{
Print(DateTime.Now + " Greater Volume is in the ES 12-10 Contract");
}
}
You could also set that up to email you, or pop up an alert in the alerts window.
I haven't really tested that code but it should get you started.
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by quantismo, Today, 05:13 PM
|
0 responses
5 views
0 likes
|
Last Post
by quantismo
Today, 05:13 PM
|
||
Started by AttiM, 02-14-2024, 05:20 PM
|
8 responses
166 views
0 likes
|
Last Post
by jeronymite
Today, 05:00 PM
|
||
Started by cre8able, Today, 04:22 PM
|
0 responses
7 views
0 likes
|
Last Post
by cre8able
Today, 04:22 PM
|
||
Started by RichStudent, Today, 04:21 PM
|
0 responses
5 views
0 likes
|
Last Post
by RichStudent
Today, 04:21 PM
|
||
Started by cre8able, Today, 04:16 PM
|
0 responses
8 views
0 likes
|
Last Post
by cre8able
Today, 04:16 PM
|
Comment