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

set TP from close price of previous candle

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

    set TP from close price of previous candle

    I'm currently using average fill price to figure out my TP order, is there a way to calculate it using the close price of the previous candle instead of from the average fill price?
    This is how its currently calculating it:
    Math.Max(execution.Order.AverageFillPrice+InitialT P*TickSize,GetCurrentAsk())

    #2
    Hello gm7_forum,

    Thank you for your post.

    You can access the Close price of the previous bar to use in your calculations for the TP price using Close[1].



    Please let me know if this doesn't guide you in the right direction.
    Gaby V.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by bc24fl, 08-30-2019, 01:58 PM
    4 responses
    259 views
    0 likes
    Last Post PaulMohn  
    Started by sugalt, Today, 04:02 AM
    0 responses
    6 views
    0 likes
    Last Post sugalt
    by sugalt
     
    Started by tradingnasdaqprueba, 04-09-2024, 09:52 AM
    6 responses
    30 views
    0 likes
    Last Post tradingnasdaqprueba  
    Started by PaulMohn, Today, 02:06 AM
    1 response
    8 views
    0 likes
    Last Post PaulMohn  
    Started by Mindset, Today, 01:27 AM
    0 responses
    6 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Working...
    X