NinjaTrader Support Forum  

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 02-07-2008, 05:35 PM   #1
gygraham
Member
 
Join Date: Dec 2007
Posts: 35
Thanks: 0
Thanked 0 times in 0 posts
Default Market entry and ema exit

I am trying to use the Wizzard and create a Market Price Entry and an EMA 5/6 exit.
The Idea is that the desired EMA crossover entry was not setup and it is now too late to enter using that strategy. This is to be an alternate entry related to Market price.

Is the following correct for a LONG MARKET entry? I do not think I can back test it.

Step one: "IF" EntryPrice>=GetCurrentAsk()
"DO" EnterLong(DefaultQuantity." ")

Step two: CrossBelow(EMA(5),EMA(6),1)
ExitShort(" ". " ")

If I enter at MARKET would this get me in going long and then out when the crossover occurs? I need a stop for this entry if it were to reverse immediately, but I honestly don't know how. If it gets me in I can monitor it until the profit is high enough to allow the crossover to exit normally
gygraham is offline  
Reply With Quote
Old 02-07-2008, 07:56 PM   #2
NinjaTrader_Josh
NinjaTrader Product Manager
 
NinjaTrader_Josh's Avatar
 
Join Date: May 2007
Location: Denver, CO
Posts: 17,458
Thanks: 1
Thanked 107 times in 70 posts
Default

You would want to do an ExitLong() order not an ExitShort() order to exit your long position.
NinjaTrader_Josh 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
Using the Strategizer how do I write the entry EMA & exit using another EMA gygraham Strategy Development 1 02-05-2008 01:48 PM
Order entry/exit lines monpere Charting 1 12-23-2007 10:28 AM
Using multiple entry/exit signals simultaneously Learning1 Strategy Development 6 09-18-2007 02:27 PM
Where's the horizontal pending, entry and exit lines? Antraman Charting 4 01-12-2007 02:26 AM
order entry/exit Vin Miscellaneous Support 1 06-29-2005 12:10 AM


All times are GMT -6. The time now is 04:51 PM.