Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Target based on prior price

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

    Target based on prior price

    I know this is a simple question, but I can't seem to find the right direction....how can I set my profit target to equal the closing price of the bar that is X number of bars from the entry? Thanks!

    #2
    BishopM05, you would set your SetProfitTarget then with your entry condition, for example

    Code:
    if (Position.MarketPosition == MarketPosition.Flat
                    && CrossAbove(Stochastics(7, 14, 3).K, Stochastics(7, 14, 3).D, 1))
                {
                    EnterLong(DefaultQuantity, "");
    	  SetProfitTarget("", CalculationMode.Price, Close[5]);
                }

    Comment


      #3
      Ahh, that's the ticket! Thanks a bunch!

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by Geovanny Suaza, 02-11-2026, 06:32 PM
      0 responses
      558 views
      0 likes
      Last Post Geovanny Suaza  
      Started by Geovanny Suaza, 02-11-2026, 05:51 PM
      0 responses
      324 views
      1 like
      Last Post Geovanny Suaza  
      Started by Mindset, 02-09-2026, 11:44 AM
      0 responses
      101 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Started by Geovanny Suaza, 02-02-2026, 12:30 PM
      0 responses
      545 views
      1 like
      Last Post Geovanny Suaza  
      Started by RFrosty, 01-28-2026, 06:49 PM
      0 responses
      547 views
      1 like
      Last Post RFrosty
      by RFrosty
       
      Working...
      X