Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Pivots withiin Strategy Question

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

    Pivots withiin Strategy Question

    Hi,

    If I want to get the Pivots for today within my Strategy and I call

    double value = Pivots(PivotRange.Daily, HLCCalculationMode.UserDefinedValues, 20).PP[0];
    Print(
    "The current Pivots pivot value is " + value.ToString());

    So that I want to pass in the High Low Close using the HLCCalculationMode.UserDefinedValues. How do I specify the User Defined High, Low Close. I can't seem to figure out how I am supposed to define or pass them to the Pivots function.

    Thanks....

    Mark

    #2
    Try something like:

    Code:
    if (FirstBarOfSession)
    {
        Pivots(PivotRange.Daily, HLCCalculationMode.UserDefinedValues, 20).UserDefinedHigh = yourHighValue;
        Pivots(PivotRange.Daily, HLCCalculationMode.UserDefinedValues, 20).UserDefinedLow = yourLowValue;
        Pivots(PivotRange.Daily, HLCCalculationMode.UserDefinedValues, 20).UserDefinedClose = yourCloseValue;
    }
    RayNinjaTrader Customer Service

    Comment


      #3
      Ray,

      That is great, thanks.

      While I have you here, is there an easy way to get:

      Yesterday High
      Yesterday Low
      Yesterday Close

      LastWeek High
      LastWeek Low
      Last Week Close

      I have Zen Fire data feed.

      Thanks again..........

      Mark

      Comment


        #4
        There are not weekly based indicator but you can try the following for daily.

        PriorDayOHLC() - http://www.ninjatrader-support.com/H...orDayOHLC.html
        RayNinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by SalmaTrader, 07-07-2026, 10:26 PM
        0 responses
        46 views
        0 likes
        Last Post SalmaTrader  
        Started by CarlTrading, 07-05-2026, 01:16 PM
        0 responses
        22 views
        0 likes
        Last Post CarlTrading  
        Started by CaptainJack, 06-17-2026, 10:32 AM
        0 responses
        14 views
        0 likes
        Last Post CaptainJack  
        Started by kinfxhk, 06-17-2026, 04:15 AM
        0 responses
        20 views
        0 likes
        Last Post kinfxhk
        by kinfxhk
         
        Started by kinfxhk, 06-17-2026, 04:06 AM
        0 responses
        22 views
        0 likes
        Last Post kinfxhk
        by kinfxhk
         
        Working...
        X