Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Using Price Low Less ?? No Drawing Object in Conditions

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

    Using Price Low Less ?? No Drawing Object in Conditions

    Good Day Ninjatrader Support,

    Hope you are doing well.

    Can you please advise on creating this Condition
    - When Current Bars Price Low is Less than Drawing Object line -

    I have the strategy creating a Fib Retracement - I am now attempting to trigger a trade following the Condition that 0% line is touched.
    Drawing Objects do not appear in Conditions and so I am stuck.

    What would you advise?

    Thank you and all the best.

    #2
    Hello ScottW,

    There is a sample of using the price levels in the following link; https://ninjatrader.com/support/help...ub=Retracement

    I would suggest using a Print and find which index the price level you wanted is first, after you do that you can use the method:
    PriceLevels[int idx].GetPrice(double startPrice, double totalPriceRange, bool isInverted)

    Code:
    FibonacciRetracements  myRetracements = Draw.FibonacciRetracements(this, "fib", true, 20, High[20], 2, Low[2]);
    ​
    for (int i = 0; i < myRetracements.PriceLevels.Count; i++)
    {
    Print(i);
    PriceLevel p = myRetracements.PriceLevels[i] as PriceLevel;
    Print(p.Value);
    Print(p.GetPrice(myRetracements.StartAnchor.Price, myRetracements.EndAnchor.Price - myRetracements.StartAnchor.Price, false));
    }
    after identifying the index with the for loop you could just use that number directly like the following without the loop:
    Code:
    PriceLevel p = myRetracements.PriceLevels[IndexYouFound] as PriceLevel;
    // example: PriceLevel p = myRetracements.PriceLevels[3] as PriceLevel;
    Print(p.Value);
    Print(p.GetPrice(myRetracements.StartAnchor.Price, myRetracements.EndAnchor.Price - myRetracements.StartAnchor.Price, false));
    ​​

    Comment


      #3
      Thank you, Jesse, I appreciate your support. I am attempting to understand and do what you describe.
      I just want to clarify that I am using the Strategy Builder and have no coding experience.
      When I followed along with the suggested video I became stuck using the String Builder -Print.
      I cannot find any reference to Drawing Objects - Indicators, yes, but not Drawing Objects.
      Is it possible to do this using the Strategy Builder?

      Thanks, Jesse.
      Attached Files

      Comment


        #4
        Hello ScottW,

        You won't be able to do this in the builder, this requires manual coding.

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by NullPointStrategies, 03-13-2026, 05:17 AM
        0 responses
        87 views
        0 likes
        Last Post NullPointStrategies  
        Started by argusthome, 03-08-2026, 10:06 AM
        0 responses
        151 views
        0 likes
        Last Post argusthome  
        Started by NabilKhattabi, 03-06-2026, 11:18 AM
        0 responses
        80 views
        0 likes
        Last Post NabilKhattabi  
        Started by Deep42, 03-06-2026, 12:28 AM
        0 responses
        53 views
        0 likes
        Last Post Deep42
        by Deep42
         
        Started by TheRealMorford, 03-05-2026, 06:15 PM
        0 responses
        62 views
        0 likes
        Last Post TheRealMorford  
        Working...
        X