Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

Kagi Chart: exit on the close of current bar,rather than on the open

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

    Kagi Chart: exit on the close of current bar,rather than on the open

    To solve some of the problems of back tests with Kagi charts, you could write the code , in a way that when you enter the market you take the close of current bar rather than the open.
    Is this possible?
    The problem is in the trades in profit, as you can see from the attached graphs. While you cancel when the trade is a loss, as can be seen from the graphs attached.

    Roberto
    Attached Files

    #2
    Hi Roberto,

    Thank you for your post.

    This is not possible with the back test. The reason is that we don't know the last close price of the bar to the next bar is started. This is due the fact that the last tick of the bar is the first tick of the next bar. This last tick is what closes that bar.

    The link below will explain how the bars are built.
    http://www.ninjatrader.com/support/h..._are_built.htm

    Let me know if I can be of further assistance
    Cal H.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by ageeholdings, 05-01-2024, 05:22 AM
    6 responses
    42 views
    0 likes
    Last Post ageeholdings  
    Started by tony_28217, Today, 07:04 PM
    0 responses
    11 views
    0 likes
    Last Post tony_28217  
    Started by flybuzz, Today, 10:33 AM
    1 response
    9 views
    0 likes
    Last Post flybuzz
    by flybuzz
     
    Started by spencerp92, 10-10-2023, 09:56 AM
    4 responses
    308 views
    0 likes
    Last Post flybuzz
    by flybuzz
     
    Started by samish18, Yesterday, 10:13 AM
    1 response
    26 views
    0 likes
    Last Post NinjaTrader_Eduardo  
    Working...
    X