NinjaTrader Support Forum  
X

Attention!

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


Go Back   NinjaTrader Support Forum > Application Technical Support > Strategy Analyzer

Strategy Analyzer Support for automated system backtesting and optimization using the NinjaTrader Strategy Analyzer.

Reply
 
Thread Tools Display Modes
Old 02-07-2009, 10:29 AM   #1
foundr
Junior Member
 
Join Date: Jan 2009
Posts: 2
Thanks: 0
Thanked 0 times in 0 posts
Default Entry Price Generation

Hey!


I'm pretty new to NT - but loving it - and I can't figure something out...

How do you generate a price for entry in a strategy?

I understand you can put in price dependant on OHLC as many ticks back etc

but say I wanted to do something slightly different
for example....

Say I want to place a market order if price moves n% after an indicator goes off [not within a certain time frame]

Is there a simple way of doing this in the Backtesting /Strategy wizard?

I was trying to do something like this in Conditions and Actions
Variable0 = High[0]
Variable1 = 1.05
Variable2 = Variable0 x Variable1
EnterLongLimit(DefaultQuantity, Variable2, "SignalPriceVariable2")

But when I try it - Variable2 defaults to '0'
And nothing happens

Thanks in advance!
foundr is offline  
Reply With Quote
Old 02-07-2009, 11:48 AM   #2
NinjaTrader_Ben
NinjaTrader Customer Service
 
NinjaTrader_Ben's Avatar
 
Join Date: May 2008
Location: Denver, CO
Posts: 3,157
Thanks: 0
Thanked 3 times in 3 posts
Default

Hello,

Try Print()'ing out the variable 2 after you do the multiplication but before your order entry. What do you get?
NinjaTrader_Ben is offline  
Reply With Quote
Old 02-07-2009, 12:01 PM   #3
foundr
Junior Member
 
Join Date: Jan 2009
Posts: 2
Thanks: 0
Thanked 0 times in 0 posts
Default Yea.... lotsa errors

Error msg in Log:


Calculated trail stop price for strategy 'MyStrategyTester' was smaller/equal 0. No trail stop order placed.



Code looks like this now:

Variable0 = High[0];
Variable1 = 1.05;
Variable2 = (Variable1 * Variable0);
PrintWithTimeStamp("Variable2");
EnterLongLimit(DefaultQuantity, Variable2, "SignalLong1");


Could this be due to the fact I'm trying to enter a limit order above market price [perhaps it 'should be' a 'Simulated Stop Order']

Thanks!
foundr is offline  
Reply With Quote
Old 02-07-2009, 09:39 PM   #4
NinjaTrader_Ben
NinjaTrader Customer Service
 
NinjaTrader_Ben's Avatar
 
Join Date: May 2008
Location: Denver, CO
Posts: 3,157
Thanks: 0
Thanked 3 times in 3 posts
Default

Hello,

That might be it. Try placing a stop or stoplimit above the market on the buy side or a limit above the market on the sell side and see if that helps.
NinjaTrader_Ben 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
Stopping out at entry price rsi77 Strategy Development 2 01-18-2009 11:30 PM
ATM strategies: signal price instead of average entry price mario73 ATM Strategies (Discretionary Trading) 1 01-02-2009 02:49 AM
Entry Price Question Mike Winfrey Automated Trading 6 12-04-2008 02:51 PM
How to return the Position Entry Price?? Ninja in Training Strategy Development 3 08-05-2008 10:06 AM
Avg Entry Price in a Strategy Sartis23 SuperDOM and other Order Entry Windows 1 03-28-2008 08:17 AM


All times are GMT -6. The time now is 09:46 PM.