PDA

View Full Version : Alert for OHLC, SMA, Pivots


cre8it8
07-21-2008, 09:30 PM
Hi,
I was trying to develope a strategy that alerts me when the price high (going up), or price low (going down) hits either a OHLC, SMA, or pivot on a 1min chart but I couldn't seem to get it to work. Could you give me an example of what the wizard or code might look like. I also want it to alert right when it happens not on bar close. What I am trying to do is have it alert (audio) me when the price on the Dow say hits the low for the day again so that I am aware of it while I am trading on the ES. Any help would be much appreciated. Thank you.

NinjaTrader_Josh
07-21-2008, 10:43 PM
You would want to use PlaySound() or Alert(). Remember to set CalculateOnBarClose to false since you want it to process on every tick. Now you just need a condition. Maybe something like:
if (Close[0] == MIN(Low, Bars.BarsSinceSession)[0])
PlaySound(@"C:\mySound.wav");

cre8it8
07-21-2008, 10:50 PM
You would want to use PlaySound() or Alert(). Remember to set CalculateOnBarClose to false since you want it to process on every tick. Now you just need a condition. Maybe something like:
if (Close[0] == MIN(Low, Bars.BarsSinceSession)[0])
PlaySound(@"C:\mySound.wav");
Thanks! I will give that a try. What does the MIN stand for? Are there similar wizard choices to the code you gave me?

NinjaTrader_Josh
07-22-2008, 01:11 AM
MIN gives you the lowest value of the series over a period. You can see more in the Help Guide.

cre8it8
07-28-2008, 07:53 PM
"thank You!"