![]() |
This website will be down for maintenance from Friday May 24th at 6PM MDT until Saturday May 25th at 11AM MDT. We apologize for the inconvenience. If you need assistance during this time, please email sales@ninjatrader.com
|
|||||||
| Indicator Development Support for the development of custom indicators using NinjaScript. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Junior Member
Join Date: Mar 2009
Posts: 3
Thanks: 0
Thanked 0 times in 0 posts
|
I am having problem with Sma crossing. I use sma 20 and sma 4 and to get an alert when 4 crosses over 20 to show a green triangle and when 4 crosses below 20 for red triangle. I see it visually on the chart, but the triangles show up after the fact on all 4x instruments and when it sends email to me I don't which instrument was triggered.do I have to have nt script on each instrument for email to be specific. I have example of one of the charts attached.wrong sma crossovers on 4x instrument using NT strategy.JPG Can some help??? I have tried it several times and the signal occurs but the triangles show several pips later. thanks in advance
|
|
|
|
|
|
#2 |
|
NinjaTrader Product Manager
Join Date: May 2007
Location: Denver, CO
Posts: 17,458
Thanks: 1
Thanked 106 times in 70 posts
|
faithpips,
Crosses can occur any time, but you can only place objects or anything like that on actual bars. The arrow pointing to it is the correct place for the cross.
Josh
NinjaTrader Customer Service |
|
|
|
|
|
#3 |
|
Junior Member
Join Date: Mar 2009
Posts: 3
Thanks: 0
Thanked 0 times in 0 posts
|
Josh I am not sure I understand what ur saying but if u look at the chart posted the crossover is highlighted in yellow using NT sript, the triangles are showing after the cross and I just want to know how to fix it. thanks
|
|
|
|
|
|
#4 |
|
Junior Member
Join Date: Feb 2008
Posts: 9
Thanks: 0
Thanked 0 times in 0 posts
|
The triangles are showing in the correct locations - the bar after the cross occurs. From your screenshot, most of the crosses occur between bars.
Have a read of the help file about onbarupdate and calculateonbarclose: http://www.ninjatrader-support.com/H...dateEvent.html |
|
|
|
|
|
#5 |
|
Junior Member
Join Date: Mar 2009
Posts: 3
Thanks: 0
Thanked 0 times in 0 posts
|
Thanks decus, I have been away for a while. What I am trying to achieve is to get the cross over as it happens not after the fact. Waiting til the bar closes is too late.
![]()
|
|
|
|
|
|
#6 |
|
Junior Member
Join Date: Apr 2009
Posts: 1
Thanks: 0
Thanked 0 times in 0 posts
|
How can I write this program on my strategy.
I want an indicator on my chart when the opening bar is above both the 8 and the 20 SMA and vis versa. THANKS LAKAYANA |
|
|
|
|
|
#7 |
|
NinjaTrader Product Manager
Join Date: May 2007
Location: Denver, CO
Posts: 17,458
Thanks: 1
Thanked 106 times in 70 posts
|
lakayana,
I suggest you review the tutorial on how to make strategies with the Strategy Wizard here first: http://www.ninjatrader-support.com/H...tml?Overview34 You want to just create yourself a Price vs Indicator condition. Please see this article for an idea: http://www.ninjatrader-support.com/H...ataComparisons Instead of doing price vs price, on one side just select an indicator instead.
Josh
NinjaTrader Customer Service |
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Draw a x minute SMA/SMA/WMA on another timeframe? | ninjamouse | Indicator Development | 4 | 04-06-2009 06:54 AM |
| Lower High script for NT | rehtrade | Automated Trading | 12 | 03-30-2009 11:21 AM |
| Once per crossover? | 5iver | Strategy Development | 6 | 12-13-2008 12:37 PM |
| where is the latest and correct sampel script for using eSignal EFS + NT DLL | clearpicks | Automated Trading | 1 | 05-22-2008 10:49 PM |
| How can I run a NT Script on 20 different Forex Symbols without 20 charts open? | ccie8340 | Automated Trading | 3 | 07-29-2007 11:24 PM |