limit e-mail alerts - NinjaTrader Programming | futures io social day trading
futures io futures trading


limit e-mail alerts
Updated: Views / Replies:244 / 3
Created: by Jorma Attachments:0

Welcome to futures io.

(If you already have an account, login at the top of the page)

futures io is the largest futures trading community on the planet, with over 90,000 members. At futures io, our goal has always been and always will be to create a friendly, positive, forward-thinking community where members can openly share and discuss everything the world of trading has to offer. The community is one of the friendliest you will find on any subject, with members going out of their way to help others. Some of the primary differences between futures io and other trading sites revolve around the standards of our community. Those standards include a code of conduct for our members, as well as extremely high standards that govern which partners we do business with, and which products or services we recommend to our members.

At futures io, our focus is on quality education. No hype, gimmicks, or secret sauce. The truth is: trading is hard. To succeed, you need to surround yourself with the right support system, educational content, and trading mentors Ė all of which you can find on futures io, utilizing our social trading environment.

With futures io, you can find honest trading reviews on brokers, trading rooms, indicator packages, trading strategies, and much more. Our trading review process is highly moderated to ensure that only genuine users are allowed, so you donít need to worry about fake reviews.

We are fundamentally different than most other trading sites:
  • We are here to help. Just let us know what you need.
  • We work extremely hard to keep things positive in our community.
  • We do not tolerate rude behavior, trolling, or vendors advertising in posts.
  • We firmly believe in and encourage sharing. The holy grail is within you, we can help you find it.
  • We expect our members to participate and become a part of the community. Help yourself by helping others.

You'll need to register in order to view the content of the threads and start contributing to our community.  It's free and simple.

-- Big Mike, Site Administrator

Reply
 
Thread Tools Search this Thread
 

limit e-mail alerts

  #1 (permalink)
Elite Member
Versailles Ile de france France
 
Futures Experience: Beginner
Platform: Sierra
Favorite Futures: Futures
 
Posts: 4 since Dec 2013
Thanks: 0 given, 0 received

limit e-mail alerts

this the program of my indicator and i want to receive 1 or 2 mails per bar, no more.
I asked in ninjatrader forum and they told me this:

Declare an integer variable. Have this variable reset to 0 on the first tick of the bar. Where you have the alert / email, add a condition that checks the value of the integer variable being under how many alerts / emails you want. Increment the integer variable each time the alert / email is triggered.
In your alert call, be sure to set the rearmSeconds to a value above 0, and to a comfortable level.

but i don' t know how to do this.


//
// Copyright (C) 2006, NinjaTrader LLC <ninjatrader@ninjatrader.com>.
// NinjaTrader reserves the right to modify or overwrite this NinjaScript component with each release.
//

#region Using declarations
using System;
using System.ComponentModel;
using System.Drawing;
using System.Drawing.Drawing2D;
using System.Xml.Serialization;
using NinjaTrader.Data;
using NinjaTrader.Gui.Chart;
#endregion

#region NinjaScript generated code. Neither change nor remove.
// This namespace holds all indicators and is required. Do not change it.
namespace NinjaTrader.Indicator
{
public partial class Indicator : IndicatorBase
{
private RMO[] cacheRMO = null;
private RMOarrowColor[] cacheRMOarrowColor = null;
private RMOlowerStraight[] cacheRMOlowerStraight = null;

private static RMO checkRMO = new RMO();
private static RMOarrowColor checkRMOarrowColor = new RMOarrowColor();
private static RMOlowerStraight checkRMOlowerStraight = new RMOlowerStraight();

/// <summary>
/// RMO Indicator
/// </summary>
/// <returns></returns>
public RMO RMO(int length, int rmoLength, bool showRMO, int swingTrdLen)
{
return RMO(Input, length, rmoLength, showRMO, swingTrdLen);
}

/// <summary>
/// RMO Indicator
/// </summary>
/// <returns></returns>
public RMO RMO(Data.IDataSeries input, int length, int rmoLength, bool showRMO, int swingTrdLen)
{
if (cacheRMO != null)
for (int idx = 0; idx < cacheRMO.Length; idx++)
if (cacheRMO[idx].Length == length && cacheRMO[idx].RmoLength == rmoLength && cacheRMO[idx].ShowRMO == showRMO && cacheRMO[idx].SwingTrdLen == swingTrdLen && cacheRMO[idx].EqualsInput(input))
return cacheRMO[idx];

lock (checkRMO)
{
checkRMO.Length = length;
length = checkRMO.Length;
checkRMO.RmoLength = rmoLength;
rmoLength = checkRMO.RmoLength;
checkRMO.ShowRMO = showRMO;
showRMO = checkRMO.ShowRMO;
checkRMO.SwingTrdLen = swingTrdLen;
swingTrdLen = checkRMO.SwingTrdLen;

if (cacheRMO != null)
for (int idx = 0; idx < cacheRMO.Length; idx++)
if (cacheRMO[idx].Length == length && cacheRMO[idx].RmoLength == rmoLength && cacheRMO[idx].ShowRMO == showRMO && cacheRMO[idx].SwingTrdLen == swingTrdLen && cacheRMO[idx].EqualsInput(input))
return cacheRMO[idx];

RMO indicator = new RMO();
indicator.BarsRequired = BarsRequired;
indicator.CalculateOnBarClose = CalculateOnBarClose;
#if NT7
indicator.ForceMaximumBarsLookBack256 = ForceMaximumBarsLookBack256;
indicator.MaximumBarsLookBack = MaximumBarsLookBack;
#endif
indicator.Input = input;
indicator.Length = length;
indicator.RmoLength = rmoLength;
indicator.ShowRMO = showRMO;
indicator.SwingTrdLen = swingTrdLen;
Indicators.Add(indicator);
indicator.SetUp();

RMO[] tmp = new RMO[cacheRMO == null ? 1 : cacheRMO.Length + 1];
if (cacheRMO != null)
cacheRMO.CopyTo(tmp, 0);
tmp[tmp.Length - 1] = indicator;
cacheRMO = tmp;
return indicator;
}
}

/// <summary>
/// Enter the description of your new custom indicator here
/// </summary>
/// <returns></returns>
public RMOarrowColor RMOarrowColor(string alertSound, string emailFrom, string emailTo, int length, int rmoLength, int separation, int swingTrdLen)
{
return RMOarrowColor(Input, alertSound, emailFrom, emailTo, length, rmoLength, separation, swingTrdLen);
}

/// <summary>
/// Enter the description of your new custom indicator here
/// </summary>
/// <returns></returns>
public RMOarrowColor RMOarrowColor(Data.IDataSeries input, string alertSound, string emailFrom, string emailTo, int length, int rmoLength, int separation, int swingTrdLen)
{
if (cacheRMOarrowColor != null)
for (int idx = 0; idx < cacheRMOarrowColor.Length; idx++)
if (cacheRMOarrowColor[idx].AlertSound == alertSound && cacheRMOarrowColor[idx].EmailFrom == emailFrom && cacheRMOarrowColor[idx].EmailTo == emailTo && cacheRMOarrowColor[idx].Length == length && cacheRMOarrowColor[idx].RmoLength == rmoLength && cacheRMOarrowColor[idx].Separation == separation && cacheRMOarrowColor[idx].SwingTrdLen == swingTrdLen && cacheRMOarrowColor[idx].EqualsInput(input))
return cacheRMOarrowColor[idx];

lock (checkRMOarrowColor)
{
checkRMOarrowColor.AlertSound = alertSound;
alertSound = checkRMOarrowColor.AlertSound;
checkRMOarrowColor.EmailFrom = emailFrom;
emailFrom = checkRMOarrowColor.EmailFrom;
checkRMOarrowColor.EmailTo = emailTo;
emailTo = checkRMOarrowColor.EmailTo;
checkRMOarrowColor.Length = length;
length = checkRMOarrowColor.Length;
checkRMOarrowColor.RmoLength = rmoLength;
rmoLength = checkRMOarrowColor.RmoLength;
checkRMOarrowColor.Separation = separation;
separation = checkRMOarrowColor.Separation;
checkRMOarrowColor.SwingTrdLen = swingTrdLen;
swingTrdLen = checkRMOarrowColor.SwingTrdLen;

if (cacheRMOarrowColor != null)
for (int idx = 0; idx < cacheRMOarrowColor.Length; idx++)
if (cacheRMOarrowColor[idx].AlertSound == alertSound && cacheRMOarrowColor[idx].EmailFrom == emailFrom && cacheRMOarrowColor[idx].EmailTo == emailTo && cacheRMOarrowColor[idx].Length == length && cacheRMOarrowColor[idx].RmoLength == rmoLength && cacheRMOarrowColor[idx].Separation == separation && cacheRMOarrowColor[idx].SwingTrdLen == swingTrdLen && cacheRMOarrowColor[idx].EqualsInput(input))
return cacheRMOarrowColor[idx];

RMOarrowColor indicator = new RMOarrowColor();
indicator.BarsRequired = BarsRequired;
indicator.CalculateOnBarClose = CalculateOnBarClose;
#if NT7
indicator.ForceMaximumBarsLookBack256 = ForceMaximumBarsLookBack256;
indicator.MaximumBarsLookBack = MaximumBarsLookBack;
#endif
indicator.Input = input;
indicator.AlertSound = alertSound;
indicator.EmailFrom = emailFrom;
indicator.EmailTo = emailTo;
indicator.Length = length;
indicator.RmoLength = rmoLength;
indicator.Separation = separation;
indicator.SwingTrdLen = swingTrdLen;
Indicators.Add(indicator);
indicator.SetUp();

RMOarrowColor[] tmp = new RMOarrowColor[cacheRMOarrowColor == null ? 1 : cacheRMOarrowColor.Length + 1];
if (cacheRMOarrowColor != null)
cacheRMOarrowColor.CopyTo(tmp, 0);
tmp[tmp.Length - 1] = indicator;
cacheRMOarrowColor = tmp;
return indicator;
}
}

/// <summary>
/// Enter the description of your new custom indicator here
/// </summary>
/// <returns></returns>
public RMOlowerStraight RMOlowerStraight(int length, int rmoLength, int separation, bool showLabel, int swingTrdLen)
{
return RMOlowerStraight(Input, length, rmoLength, separation, showLabel, swingTrdLen);
}

/// <summary>
/// Enter the description of your new custom indicator here
/// </summary>
/// <returns></returns>
public RMOlowerStraight RMOlowerStraight(Data.IDataSeries input, int length, int rmoLength, int separation, bool showLabel, int swingTrdLen)
{
if (cacheRMOlowerStraight != null)
for (int idx = 0; idx < cacheRMOlowerStraight.Length; idx++)
if (cacheRMOlowerStraight[idx].Length == length && cacheRMOlowerStraight[idx].RmoLength == rmoLength && cacheRMOlowerStraight[idx].Separation == separation && cacheRMOlowerStraight[idx].ShowLabel == showLabel && cacheRMOlowerStraight[idx].SwingTrdLen == swingTrdLen && cacheRMOlowerStraight[idx].EqualsInput(input))
return cacheRMOlowerStraight[idx];

lock (checkRMOlowerStraight)
{
checkRMOlowerStraight.Length = length;
length = checkRMOlowerStraight.Length;
checkRMOlowerStraight.RmoLength = rmoLength;
rmoLength = checkRMOlowerStraight.RmoLength;
checkRMOlowerStraight.Separation = separation;
separation = checkRMOlowerStraight.Separation;
checkRMOlowerStraight.ShowLabel = showLabel;
showLabel = checkRMOlowerStraight.ShowLabel;
checkRMOlowerStraight.SwingTrdLen = swingTrdLen;
swingTrdLen = checkRMOlowerStraight.SwingTrdLen;

if (cacheRMOlowerStraight != null)
for (int idx = 0; idx < cacheRMOlowerStraight.Length; idx++)
if (cacheRMOlowerStraight[idx].Length == length && cacheRMOlowerStraight[idx].RmoLength == rmoLength && cacheRMOlowerStraight[idx].Separation == separation && cacheRMOlowerStraight[idx].ShowLabel == showLabel && cacheRMOlowerStraight[idx].SwingTrdLen == swingTrdLen && cacheRMOlowerStraight[idx].EqualsInput(input))
return cacheRMOlowerStraight[idx];

RMOlowerStraight indicator = new RMOlowerStraight();
indicator.BarsRequired = BarsRequired;
indicator.CalculateOnBarClose = CalculateOnBarClose;
#if NT7
indicator.ForceMaximumBarsLookBack256 = ForceMaximumBarsLookBack256;
indicator.MaximumBarsLookBack = MaximumBarsLookBack;
#endif
indicator.Input = input;
indicator.Length = length;
indicator.RmoLength = rmoLength;
indicator.Separation = separation;
indicator.ShowLabel = showLabel;
indicator.SwingTrdLen = swingTrdLen;
Indicators.Add(indicator);
indicator.SetUp();

RMOlowerStraight[] tmp = new RMOlowerStraight[cacheRMOlowerStraight == null ? 1 : cacheRMOlowerStraight.Length + 1];
if (cacheRMOlowerStraight != null)
cacheRMOlowerStraight.CopyTo(tmp, 0);
tmp[tmp.Length - 1] = indicator;
cacheRMOlowerStraight = tmp;
return indicator;
}
}
}
}

// This namespace holds all market analyzer column definitions and is required. Do not change it.
namespace NinjaTrader.MarketAnalyzer
{
public partial class Column : ColumnBase
{
/// <summary>
/// RMO Indicator
/// </summary>
/// <returns></returns>
[Gui.Design.WizardCondition("Indicator")]
public Indicator.RMO RMO(int length, int rmoLength, bool showRMO, int swingTrdLen)
{
return _indicator.RMO(Input, length, rmoLength, showRMO, swingTrdLen);
}

/// <summary>
/// RMO Indicator
/// </summary>
/// <returns></returns>
public Indicator.RMO RMO(Data.IDataSeries input, int length, int rmoLength, bool showRMO, int swingTrdLen)
{
return _indicator.RMO(input, length, rmoLength, showRMO, swingTrdLen);
}

/// <summary>
/// Enter the description of your new custom indicator here
/// </summary>
/// <returns></returns>
[Gui.Design.WizardCondition("Indicator")]
public Indicator.RMOarrowColor RMOarrowColor(string alertSound, string emailFrom, string emailTo, int length, int rmoLength, int separation, int swingTrdLen)
{
return _indicator.RMOarrowColor(Input, alertSound, emailFrom, emailTo, length, rmoLength, separation, swingTrdLen);
}

/// <summary>
/// Enter the description of your new custom indicator here
/// </summary>
/// <returns></returns>
public Indicator.RMOarrowColor RMOarrowColor(Data.IDataSeries input, string alertSound, string emailFrom, string emailTo, int length, int rmoLength, int separation, int swingTrdLen)
{
return _indicator.RMOarrowColor(input, alertSound, emailFrom, emailTo, length, rmoLength, separation, swingTrdLen);
}

/// <summary>
/// Enter the description of your new custom indicator here
/// </summary>
/// <returns></returns>
[Gui.Design.WizardCondition("Indicator")]
public Indicator.RMOlowerStraight RMOlowerStraight(int length, int rmoLength, int separation, bool showLabel, int swingTrdLen)
{
return _indicator.RMOlowerStraight(Input, length, rmoLength, separation, showLabel, swingTrdLen);
}

/// <summary>
/// Enter the description of your new custom indicator here
/// </summary>
/// <returns></returns>
public Indicator.RMOlowerStraight RMOlowerStraight(Data.IDataSeries input, int length, int rmoLength, int separation, bool showLabel, int swingTrdLen)
{
return _indicator.RMOlowerStraight(input, length, rmoLength, separation, showLabel, swingTrdLen);
}
}
}

// This namespace holds all strategies and is required. Do not change it.
namespace NinjaTrader.Strategy
{
public partial class Strategy : StrategyBase
{
/// <summary>
/// RMO Indicator
/// </summary>
/// <returns></returns>
[Gui.Design.WizardCondition("Indicator")]
public Indicator.RMO RMO(int length, int rmoLength, bool showRMO, int swingTrdLen)
{
return _indicator.RMO(Input, length, rmoLength, showRMO, swingTrdLen);
}

/// <summary>
/// RMO Indicator
/// </summary>
/// <returns></returns>
public Indicator.RMO RMO(Data.IDataSeries input, int length, int rmoLength, bool showRMO, int swingTrdLen)
{
if (InInitialize && input == null)
throw new ArgumentException("You only can access an indicator with the default input/bar series from within the 'Initialize()' method");

return _indicator.RMO(input, length, rmoLength, showRMO, swingTrdLen);
}

/// <summary>
/// Enter the description of your new custom indicator here
/// </summary>
/// <returns></returns>
[Gui.Design.WizardCondition("Indicator")]
public Indicator.RMOarrowColor RMOarrowColor(string alertSound, string emailFrom, string emailTo, int length, int rmoLength, int separation, int swingTrdLen)
{
return _indicator.RMOarrowColor(Input, alertSound, emailFrom, emailTo, length, rmoLength, separation, swingTrdLen);
}

/// <summary>
/// Enter the description of your new custom indicator here
/// </summary>
/// <returns></returns>
public Indicator.RMOarrowColor RMOarrowColor(Data.IDataSeries input, string alertSound, string emailFrom, string emailTo, int length, int rmoLength, int separation, int swingTrdLen)
{
if (InInitialize && input == null)
throw new ArgumentException("You only can access an indicator with the default input/bar series from within the 'Initialize()' method");

return _indicator.RMOarrowColor(input, alertSound, emailFrom, emailTo, length, rmoLength, separation, swingTrdLen);
}

/// <summary>
/// Enter the description of your new custom indicator here
/// </summary>
/// <returns></returns>
[Gui.Design.WizardCondition("Indicator")]
public Indicator.RMOlowerStraight RMOlowerStraight(int length, int rmoLength, int separation, bool showLabel, int swingTrdLen)
{
return _indicator.RMOlowerStraight(Input, length, rmoLength, separation, showLabel, swingTrdLen);
}

/// <summary>
/// Enter the description of your new custom indicator here
/// </summary>
/// <returns></returns>
public Indicator.RMOlowerStraight RMOlowerStraight(Data.IDataSeries input, int length, int rmoLength, int separation, bool showLabel, int swingTrdLen)
{
if (InInitialize && input == null)
throw new ArgumentException("You only can access an indicator with the default input/bar series from within the 'Initialize()' method");

return _indicator.RMOlowerStraight(input, length, rmoLength, separation, showLabel, swingTrdLen);
}
}
}
#endregion

Reply With Quote
 
  #2 (permalink)
Quick Summary
Quick Summary Post

Quick Summary is created and edited by users like you... Add FAQ's, Links and other Relevant Information by clicking the edit button in the lower right hand corner of this message.

 
  #3 (permalink)
Elite Member
Omer עומר / Israel י
 
Futures Experience: Master
Platform: NinjaTrader, Proprietary,
Broker/Data: Ninjabrokerage/IQfeed + Synthetic datafeed
Favorite Futures: 6A, 6B, 6C, 6E, 6J, 6S, ES, NQ, YM, AEX, CL, NG, ZB, ZN, ZC, ZS, GC
 
rleplae's Avatar
 
Posts: 2,491 since Sep 2013
Thanks: 1,705 given, 3,696 received
Forum Reputation: Legendary


What is the exact logic to fire the email ?

In big lines what you need to do :

1) you need to make sure your indicator is called not only on bar close, if you want the logic to be triggered more than once a bar (onbarclose = false)
2) you will have to keep track and see if a new bar was formed
3) upon trigger condition create email (sendmail) and put a flag (maildone =1)
4) reset the flag on a new bar (maildone =0)

hope this helps you

Reply With Quote
 
  #4 (permalink)
Administrator: Retired Backtester
 Vendor: speedytradingservers.com 
Rennes France
 
Futures Experience: Advanced
Platform: NinjaTrader
Broker/Data: IB/Kinetick
Favorite Futures: Futures
 
sam028's Avatar
 
Posts: 3,366 since Jun 2009
Thanks: 3,573 given, 3,982 received


Jorma View Post
this the program of my indicator and i want to receive 1 or 2 mails per bar, no more.
I asked in ninjatrader forum and they told me this:
...

The code provided seems to be the Ninja generated part, not the indicator itself: no Initialize(), no OnBarUpdate(), ...
We can't do anything without the source, the code provided here is useless.

Success requires no deodorant! (Sun Tzu)
Reply With Quote

Reply



futures io > > > > > limit e-mail alerts

Thread Tools Search this Thread
Search this Thread:

Advanced Search



Upcoming Webinars and Events (4:30PM ET unless noted)

Jigsaw Trading: TBA

Elite only

FuturesTrader71: TBA

Elite only

NinjaTrader: TBA

Jan 18

RandBots: TBA

Jan 23

GFF Brokers & CME Group: Futures & Bitcoin

Elite only

Adam Grimes: TBA

Elite only

Ran Aroussi: TBA

Elite only
     

Similar Threads
Thread Thread Starter Forum Replies Last Post
limit email alerts Jorma NinjaTrader Programming 2 March 2nd, 2016 08:07 AM
Multicharts e mail alert no erocla MultiCharts 0 January 27th, 2016 08:55 AM
OCO orders, set Limit and Stop Limit automatically rice0721 ThinkOrSwim 4 January 12th, 2014 01:02 PM
E-mail to alarm on Android? Arkiteq Tech Support 2 May 8th, 2013 10:46 PM
Futures e-mail alerts dtrade88 Traders Hideout 3 July 2nd, 2010 01:51 AM


All times are GMT -4. The time now is 04:18 AM.

Copyright © 2017 by futures io, s.a., Av Ricardo J. Alfaro, Century Tower, Panama, +507 833-9432, info@futures.io
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.
no new posts
Page generated 2017-12-14 in 0.16 seconds with 19 queries on phoenix via your IP 54.91.38.173