• 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

Bars required to trade in live

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

    Bars required to trade in live

    We have been running our script in Sim and getting ready to g live with and I have few questions.
    The script only has 1 condition : EMA (6 period) crossing above or below SMA ( 14 period) to initiate a long trade or a short trade , using ranger bar : 45 ticks

    What would be the ideal set ups in the strategy for the followings.
    a ) Bar required to trade. We want trade initiated once condition has been met and no need to look at historical data.
    b ) Start behavior
    c ) Order fill resolution
    d) On trailing stop in the scrip I want my stop loss to move to Break even when the trade has moved to 15 ticks in my favor, then trail by 5 tick for each 5 tick in my favor from there on, how do I set that in my Strategy builder > Trailing stop
    e) Can I combine trailing stop & fix stop loss & profit target in my Strategy builder> profit & stop loss.

    Considering that on Calculate " On each tick " has been selected.

    Thank you for your reply.
    Adiano

    #2
    Hello Adiano,

    If historical data is not important, you can set BarsRequiredToTrade to 1 and add a condition to OnBarUpdate to not evaluate when State is Historical.

    if (State == State.Historical)
    return;

    If the script is never going to make historical orders, then it will always start flat and the Start behavior no longer matters.

    Below is a link to a video that demonstrates start up behavior.
    https://www.screencast.com/t/D2GRrGe5MfzJ

    And a public link to the help guide.
    https://ninjatrader.com/support/help..._positions.htm

    Order fill resolution is only used for historical orders. This can be off.

    If you don't want tick for tick trailing and you want custom logic for trailing, you would need to use exit orders instead of set methods and control the movements with logic.

    Below is a link to an example.
    http://ninjatrader.com/support/forum...609#post503609

    SetTrailStop cannot be used when SetStopLoss is used. The SetStopLoss will superseded the SetTrailStop and trailing will not function.
    Last edited by NinjaTrader_ChelseaB; 07-09-2018, 02:52 PM.
    Chelsea B.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Brillo, Today, 08:58 AM
    0 responses
    3 views
    0 likes
    Last Post Brillo
    by Brillo
     
    Started by avrege, Today, 01:48 AM
    2 responses
    8 views
    0 likes
    Last Post avrege
    by avrege
     
    Started by markbb10, Today, 07:14 AM
    0 responses
    6 views
    0 likes
    Last Post markbb10  
    Started by leodrz, Today, 05:09 AM
    0 responses
    9 views
    0 likes
    Last Post leodrz
    by leodrz
     
    Started by yourlactures, Today, 02:23 AM
    0 responses
    2 views
    0 likes
    Last Post yourlactures  
    Working...
    X