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

Profit target dinamic

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

  • manueldecastro
    replied

    Thanks for the clarification. I will continue working on it

    Leave a comment:


  • NinjaTrader_PaulH
    replied
    Hello manueldecastro,

    Thanks for your reply and clarification.

    Regrettably in the strategy builder you are limited in what math can be performed. You can save the Close[1]-Open[1] to a double type variable but you would not be able to convert that range into ticks.

    You could create the strategy in the strategy builder and then unlock the strategy and work directly in Ninjascript to add the division of the range by the tick size.

    Leave a comment:


  • manueldecastro
    replied

    Effectively, I want to save the value of the open / close range. I'm not interested in Low / higth for my strategy. Close [1] -Open [1] is the range of the candle that I want to keep the variable, that is, the last candle closed, but I do not know how to make it save that value using the builder. Could you help me? Assume CL, Open 55 close 55.5. I need you to keep that 0.5 range in ticks. What will be the profit for sailing 0. Thank you!

    Leave a comment:


  • NinjaTrader_PaulH
    replied
    Hello manueldecastro,

    Thanks for your post and welcome to the NinjaTrader forums!

    If I understand correctly, you want to save the value of the range of the entry candle and you define the range as Open minus Close. Typically an up bar would have the Close as a higher value than the open, so perhaps what you are looking for is Close[0] - Open[0]? The Close - Open would not describe the full length so you might want to consider High - Low?

    In either case you would create a double variable and at the time you place the order, you would save the value Close[0]-Open[0] (or High[0] - Low[0]) into that double variable.

    I'm not sure how you would intend to apply that value as a profit target as the value by itself would be less than the value of the instrument. For example using ES, if the bar high is 3020.5 and the bar low is 3019.75 then the saved value would be 3020.5 - 3019.75 which equals a value of 0.75.



    Leave a comment:


  • manueldecastro
    started a topic Profit target dinamic

    Profit target dinamic


    Hello, I am trying to establish a dynamic target based on the rank of a candle. I need that when my LONG signal is activated, the Open - Close range of that candle is stored, my target being that range O - C. Could you help me? Thank you

Latest Posts

Collapse

Topics Statistics Last Post
Started by funk10101, Today, 09:43 PM
0 responses
6 views
0 likes
Last Post funk10101  
Started by pkefal, 04-11-2024, 07:39 AM
11 responses
37 views
0 likes
Last Post jeronymite  
Started by bill2023, Yesterday, 08:51 AM
8 responses
44 views
0 likes
Last Post bill2023  
Started by yertle, Today, 08:38 AM
6 responses
26 views
0 likes
Last Post ryjoga
by ryjoga
 
Started by algospoke, Yesterday, 06:40 PM
2 responses
24 views
0 likes
Last Post algospoke  
Working...
X