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

CamarillaPivots...

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

    CamarillaPivots...

    Hello,

    I want to get the support and resistance values from the CamarillaPivots indicator. It appears: CamarillaPivots(PivotRange.Daily, HLCCalculationMode.CalcFromIntradayData, 0, 0, 0, 20).S1[0]), with the last parameter set to the desired property, will work.

    I only want to make these eight calls once (save the results locally) and am seeking guidance on which OnStateChange, state, would be the best choice.

    Thanks,

    Mark


    #2
    Hello Mark,

    The call to the actual data .S1[0] would need to be in OnBarUpdate() where data is processed.

    In State.DataLoaded, you can instantiate the indicator if you want, but you would still need to retrieve the data in OnBarUpdate().

    Perhaps you are wanting to get the data on the last historical bar?
    NinjaTrader Support, I am trying to look at the last 20 bars on the chart and assign a score to each bar, for example: Red bar with lower low = -2 Green bar with higher higher = +2 How can I access the characteristics of previous bars? Thanks, -Omer
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      Hello,

      Thanks for the response.

      >the data in OnBarUpdate().

      Yeah I can do that. The values will not change after the first call. I can put a flag in OnBarUpdate to only do the call once but I was looking for a more elegant solution.

      Thanks,

      Mark

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by andrewtrades, Today, 04:57 PM
      1 response
      10 views
      0 likes
      Last Post NinjaTrader_Manfred  
      Started by chbruno, Today, 04:10 PM
      0 responses
      6 views
      0 likes
      Last Post chbruno
      by chbruno
       
      Started by josh18955, 03-25-2023, 11:16 AM
      6 responses
      436 views
      0 likes
      Last Post Delerium  
      Started by FAQtrader, Today, 03:35 PM
      0 responses
      9 views
      0 likes
      Last Post FAQtrader  
      Started by rocketman7, Today, 09:41 AM
      5 responses
      20 views
      0 likes
      Last Post NinjaTrader_Jesse  
      Working...
      X