Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

ToTime variables

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

    ToTime variables

    Hi Guys,

    trying to make an indicator that plots out times of day as entered as a variable. Converting a variable into a time period so that deductions can be made is a little confusing. Is there an easy method for this. The below gives a time of 159000 which doesnt exist.
    Thanks Raef

    privateint d1Buy1 = 160000; // Default setting for D1Buy1

    if( ToTime(Time[0]) == (d1Buy1 - 1000) ){DrawVerticalLine("tag2"+CurrentBar, 0, zupdotcolor);
    DrawText(
    "TimeZone"+ CurrentBar, bz1, 0, Low[0] - (seperation) *TickSize, Color.Black);}

    #2
    Originally posted by raefon72 View Post
    Hi Guys,

    trying to make an indicator that plots out times of day as entered as a variable. Converting a variable into a time period so that deductions can be made is a little confusing. Is there an easy method for this. The below gives a time of 159000 which doesnt exist.
    Thanks Raef

    privateint d1Buy1 = 160000; // Default setting for D1Buy1

    if( ToTime(Time[0]) == (d1Buy1 - 1000) ){DrawVerticalLine("tag2"+CurrentBar, 0, zupdotcolor);
    DrawText(
    "TimeZone"+ CurrentBar, bz1, 0, Low[0] - (seperation) *TickSize, Color.Black);}
    You might be better off using the standard C# Time structures.

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Unsuitable, Today, 07:26 PM
    0 responses
    1 view
    0 likes
    Last Post Unsuitable  
    Started by jvanelli, Today, 06:36 PM
    1 response
    6 views
    0 likes
    Last Post jeronymite  
    Started by twitch251, Today, 05:14 PM
    1 response
    5 views
    0 likes
    Last Post NinjaTrader_ShawnB  
    Started by robforee2, Today, 05:07 PM
    0 responses
    4 views
    0 likes
    Last Post robforee2  
    Started by blar58, Today, 03:16 PM
    1 response
    6 views
    0 likes
    Last Post NinjaTrader_Melissa  
    Working...
    X