Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Entry Price Generation

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    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!

    #2
    Hello,

    Try Print()'ing out the variable 2 after you do the multiplication but before your order entry. What do you get?
    DenNinjaTrader Customer Service

    Comment


      #3
      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!

      Comment


        #4
        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.
        DenNinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by CarlTrading, 03-31-2026, 09:41 PM
        1 response
        72 views
        0 likes
        Last Post NinjaTrader_ChelseaB  
        Started by CarlTrading, 04-01-2026, 02:41 AM
        0 responses
        39 views
        0 likes
        Last Post CarlTrading  
        Started by CaptainJack, 03-31-2026, 11:44 PM
        0 responses
        63 views
        2 likes
        Last Post CaptainJack  
        Started by CarlTrading, 03-30-2026, 11:51 AM
        0 responses
        63 views
        0 likes
        Last Post CarlTrading  
        Started by CarlTrading, 03-30-2026, 11:48 AM
        0 responses
        53 views
        0 likes
        Last Post CarlTrading  
        Working...
        X