NinjaTrader Support Forum  
X

Attention!

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


Go Back   NinjaTrader Support Forum > NinjaScript Development Support > Strategy Development

Strategy Development Support for the development of custom automated trading strategies using NinjaScript.

Reply
 
Thread Tools Display Modes
Old 05-21-2012, 11:31 AM   #1
A_lafreniere
Junior Member
 
Join Date: May 2012
Posts: 2
Thanks: 0
Thanked 0 times in 0 posts
Default EMA crossover

HI..!
I am doing a EMA crossover-down strategy..
The conditions I want are as follows.
If a crossover down occurs.. and.. in the last hour
the market has traded higher by 6 points or more..
Then execute the trade..
can this be done in the trade wizard?
thank
AL
A_lafreniere is offline  
Reply With Quote
Old 05-21-2012, 11:35 AM   #2
NinjaTrader_AdamP
NinjaTrader Customer Service
 
NinjaTrader_AdamP's Avatar
 
Join Date: Aug 2011
Location: Denver, CO, USA
Posts: 2,895
Thanks: 241
Thanked 375 times in 365 posts
Default

A_lafreniere,

I am happy to assist you.

What sort of chart do you plan on running this on? So far it sounds like it would be possible, however the type of chart you use would change the "In the last hour, the market has traded higher by 6 points" part.
NinjaTrader_AdamP is offline  
Reply With Quote
Old 05-22-2012, 12:42 AM   #3
A_lafreniere
Junior Member
 
Join Date: May 2012
Posts: 2
Thanks: 0
Thanked 0 times in 0 posts
Default EMA crossover

Thank you for responding so quickly..
I will be using a 3 min Chart.
AL
A_lafreniere is offline  
Reply With Quote
Old 05-22-2012, 08:42 AM   #4
NinjaTrader_AdamP
NinjaTrader Customer Service
 
NinjaTrader_AdamP's Avatar
 
Join Date: Aug 2011
Location: Denver, CO, USA
Posts: 2,895
Thanks: 241
Thanked 375 times in 365 posts
Default

Hello,

Here is an example that would work on 3 minute charts.

if ( CrossBelow(EMA(fastperiod), EMA(slowperiod)) && (Close[0]+6*TickSize) >= High[HighestBar(High,20)] )
{

// execute a trade

}
NinjaTrader_AdamP is offline  
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
EMA Color Crossover Benluk NinjaScript File Sharing Discussion 7 03-11-2012 07:59 PM
SMA/EMA crossover help? Trankuility Indicator Development 2 11-05-2010 09:24 AM
Bar/ EMA Crossover Indicator peter@cleaniq Indicator Development 3 02-23-2010 09:12 AM
EMA Crossover Rollins NinjaScript File Sharing Discussion 24 07-15-2009 10:58 AM
EMA and MA Crossover Histogram monti1a Indicator Development 1 06-21-2008 11:24 AM


All times are GMT -6. The time now is 05:54 PM.