• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Simple Entry for Testing

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

    Simple Entry for Testing

    I'm just getting started creating strategies. I was trying to write an entry that would get hit very quickly to help speed up my learning curve. That way I can play with writing profit target and stop loss code and get an idea of what is happening. The entry code I wrote for a Long is
    close[0] > close[1]
    Which I read as if the current close is greater than the previous close, then I have LongEntry().
    Shouldn't this get filled almost immediately after closing a position?

    Thanks, Tim

    #2
    Tim, welcome to our forums - it would trigger immediately for an uptick in realtime if you used the strategy with CalculateOnBarClose = false -

    http://www.ninjatrader-support.com/H...BarClose1.html

    In backtesting this is always set to 'true', as the indicator formation is not known, thus the condition would generate a long entry for each up bar according to your definition.
    BertrandNinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by rickyblah12, Today, 05:01 PM
    1 response
    3 views
    0 likes
    Last Post NinjaTrader_ShawnB  
    Started by jtrading82, 10-11-2019, 05:07 PM
    8 responses
    80 views
    1 like
    Last Post sledge
    by sledge
     
    Started by MARTIN MARTIN, Yesterday, 01:01 PM
    3 responses
    41 views
    0 likes
    Last Post MARTIN MARTIN  
    Started by NickyD, Today, 11:42 AM
    1 response
    10 views
    0 likes
    Last Post NinjaTrader_Jim  
    Started by cupir2, Today, 11:25 AM
    3 responses
    17 views
    0 likes
    Last Post NinjaTrader_Jesse  
    Working...
    X