![]() |
This website will be down for maintenance from Friday May 24th at 6PM MDT until Sunday May 26th at 12PM MDT. We apologize for the inconvenience. If you need assistance during this time, please email sales@ninjatrader.com
|
|||||||
| Strategy Analyzer Support for automated system backtesting and optimization using the NinjaTrader Strategy Analyzer. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Senior Member
Join Date: Mar 2012
Posts: 102
Thanks: 29
Thanked 4 times in 4 posts
|
Am new to NT. I am trying a simple strategy (see attachment) to begin learning.
As you can see I want to get a 'beep' when the #1 bar > #2 bar on a 50 period SMA. There are no trades to be made only a 'beep'. I cannot get any 'beeps' from strategy backtest nor do I get anything from the charts. When I first did this, I chose to have an email sent. I changed it to a 'beep' for testing. What am I doing wrong? Thank you, Duke |
|
|
|
|
|
#2 |
|
NinjaTrader Customer Service
Join Date: Apr 2010
Location: Denver, CO, USA
Posts: 4,794
Thanks: 160
Thanked 568 times in 559 posts
|
Duke,
Audio alerts will only be processed in real-time, so you will not hear anything when backtesting. You will only hear this alert on the chart when it is enabled and at the moment that condition is true. I'd suggest using the Print function under 'Do the following' to print a statement to the Tools--> Output window. Then run your backtest and check this output window to ensure this condition has ever returned as true.
Matthew
NinjaTrader Customer Service |
|
|
|
|
|
#3 | |
|
Senior Member
Join Date: Mar 2012
Posts: 102
Thanks: 29
Thanked 4 times in 4 posts
|
Quote:
|
|
|
|
|
|
|
#4 |
|
Senior Member
Join Date: Mar 2012
Posts: 102
Thanks: 29
Thanked 4 times in 4 posts
|
|
|
|
|
|
|
#5 |
|
NinjaTrader Customer Service
Join Date: Sep 2008
Location: Germany
Posts: 22,421
Thanks: 252
Thanked 982 times in 964 posts
|
Please give this a try Duke, prints a visual drawing on the chart once your condition triggers. What did you backtest on btw? Do you have the data / resolution for it available through your provider?
All the best,
Bertrand
NinjaTrader Customer Service |
|
|
|
|
|
#6 | |
|
Senior Member
Join Date: Mar 2012
Posts: 102
Thanks: 29
Thanked 4 times in 4 posts
|
Quote:
New code "DrawDiamond("My diamond" + CurrentBar, false, 0, Low[0] + -2 * TickSize, Color.Red);" "My diamond" is a tag. How does one use this for other scripts? I backtested on the AUD/USD. I don't understand what you mean when you reference "data/resolution". I am not live. I use MB Trading datafeed. I looked up the parameters for DrawDiamond. The "y" value has been omitted. In your script and the example in the reference manual. The reference example uses 'True'. Exactly, what is the 'y' value for? I want to thank you again for your help. Duke |
|
|
|
|
|
|
#7 |
|
NinjaTrader Customer Service
Join Date: Sep 2008
Location: Germany
Posts: 22,421
Thanks: 252
Thanked 982 times in 964 posts
|
You are welcome - glad to hear this worked out for you.
The tag is just internal to the script, to prevent malicious code from another interfering there's no external access to those. With resolution, I just meant which chart type and timeframe, so for example some connections dont have daily data access and customers dont realize it until they getting empty results in the backtest window for non availability of data. Y is just the Y Axis double value the object would be placed, so the price - the 'true' from the sample was probably the autoScale parameter. http://www.ninjatrader.com/support/h...rawdiamond.htm
Bertrand
NinjaTrader Customer Service |
|
|
|
|
|
#8 |
|
Senior Member
Join Date: Mar 2012
Posts: 102
Thanks: 29
Thanked 4 times in 4 posts
|
The diamond prints(yhanks to you). However the email does not work.
My intent was to have an email sent when the SMA condition was met. I still get the diamond, but no email. if (SMA(50)[0] > SMA(50)[1]) { DrawDiamond("My diamond" + CurrentBar, false, 0, Low[0] + -2 * TickSize, Color.Blue); SendMail("", "dbushong@schurusa.com", "test alert", "success"); Can you bail me out again? Duke |
|
|
|
|
|
#9 |
|
NinjaTrader Customer Service
Join Date: Sep 2008
Location: Germany
Posts: 22,421
Thanks: 252
Thanked 982 times in 964 posts
|
Duke, if you go under Tools > Options > Misc and test your email setup - does this work out?
Bertrand
NinjaTrader Customer Service |
|
|
|
|
|
#10 |
|
Senior Member
Join Date: Mar 2012
Posts: 102
Thanks: 29
Thanked 4 times in 4 posts
|
Thank you, Bertrand. Yes, I now receive emails.
Thanks to your support, I am moving forward nicely. Best regards, Duke |
|
|
|
|
|
#11 |
|
NinjaTrader Customer Service
Join Date: Sep 2008
Location: Germany
Posts: 22,421
Thanks: 252
Thanked 982 times in 964 posts
|
Glad to hear, enjoy your weekend Duke.
Bertrand
NinjaTrader Customer Service |
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Simple SL, TP, Breakeven don't work | kucharek | Strategy Development | 8 | 11-23-2011 06:39 AM |
| How come a simple volume[0] > 20000 doesnt work? | nasdaq5048 | Indicator Development | 13 | 11-24-2010 09:23 AM |
| Script in NT 6.5 does not work in NT 7 | atrader | Strategy Development | 3 | 04-15-2010 10:27 AM |
| Simple question about a simple strategy. | shakira | Strategy Development | 1 | 02-14-2009 10:56 AM |
| A simple question from a new NT programmer | elemento-portador | Indicator Development | 1 | 11-05-2007 08:00 AM |