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

Time Span to Session Span Ratio

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

    Time Span to Session Span Ratio

    Dear Support,

    I am looking for a way to correctly calculate the ratio of the current time span to session time span. For example:

    Code:
    Ratio double = (Current Time - Session Begin) / (Session End - Session Begin)
    I am wondering if there is a current "Method" in NT8 or a sample script to achieve this. Also, is it necessary to consider the Session Iterator in this calculation.

    Many thanks.
    Last edited by aligator; 11-01-2021, 10:30 AM.

    #2
    Hi aligator, thanks for writing in.

    There is no existing sample of this that we know of. The session iterator would need to be used in a custom method to calculate the ratio.

    Best regards,
    -ChrisL
    Chris L.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by funk10101, Yesterday, 09:43 PM
    1 response
    13 views
    0 likes
    Last Post NinjaTrader_Gaby  
    Started by TheWhiteDragon, 01-21-2019, 12:44 PM
    5 responses
    551 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by rtwave, 04-12-2024, 09:30 AM
    5 responses
    37 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by funk10101, Today, 12:02 AM
    1 response
    11 views
    0 likes
    Last Post NinjaTrader_LuisH  
    Started by GLFX005, Today, 03:23 AM
    1 response
    6 views
    0 likes
    Last Post NinjaTrader_Erick  
    Working...
    X