![]() |
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
|
|||||||
| Strategy Analyzer Support for automated system backtesting and optimization using the NinjaTrader Strategy Analyzer. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Junior Member
Join Date: Jan 2009
Posts: 2
Thanks: 0
Thanked 0 times in 0 posts
|
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! |
|
|
|
|
|
#2 |
|
NinjaTrader Customer Service
Join Date: May 2008
Location: Denver, CO
Posts: 3,157
Thanks: 0
Thanked 3 times in 3 posts
|
Hello,
Try Print()'ing out the variable 2 after you do the multiplication but before your order entry. What do you get?
Ben
NinjaTrader Customer Service |
|
|
|
|
|
#3 |
|
Junior Member
Join Date: Jan 2009
Posts: 2
Thanks: 0
Thanked 0 times in 0 posts
|
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! |
|
|
|
|
|
#4 |
|
NinjaTrader Customer Service
Join Date: May 2008
Location: Denver, CO
Posts: 3,157
Thanks: 0
Thanked 3 times in 3 posts
|
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.
Ben
NinjaTrader Customer Service |
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
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 |