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 argusthome, 03-08-2026, 10:06 AM
        0 responses
        88 views
        0 likes
        Last Post argusthome  
        Started by NabilKhattabi, 03-06-2026, 11:18 AM
        0 responses
        48 views
        0 likes
        Last Post NabilKhattabi  
        Started by Deep42, 03-06-2026, 12:28 AM
        0 responses
        31 views
        0 likes
        Last Post Deep42
        by Deep42
         
        Started by TheRealMorford, 03-05-2026, 06:15 PM
        0 responses
        34 views
        0 likes
        Last Post TheRealMorford  
        Started by Mindset, 02-28-2026, 06:16 AM
        0 responses
        68 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Working...
        X