• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Error with DayOfWeek

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

    Error with DayOfWeek

    Hello, how are you, I have an error when compiling an indicator and it says:


    Click image for larger version

Name:	error.PNG
Views:	2
Size:	5.7 KB
ID:	1058783


    Here is my code error.


    if ((this.otherSessionTime.DayOfWeek) == (DayOfWeek.Friday))



    Thanks.

    #2
    Hello marianfed,

    I've translated this as 'is 'put in', which is not valid in the indicated context'.

    Possibly otherSessionTime is not a DateTime object.

    Try generating the code using the Strategy Builder and then copy and paste the variable definitions and conditions in to your script.
    https://ninjatrader.com/support/foru...040#post786040
    Chelsea B.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by punkiy2111, Today, 10:59 AM
    0 responses
    2 views
    0 likes
    Last Post punkiy2111  
    Started by NickyD, Today, 10:56 AM
    0 responses
    2 views
    0 likes
    Last Post NickyD
    by NickyD
     
    Started by EthanHunt, Today, 10:54 AM
    0 responses
    3 views
    0 likes
    Last Post EthanHunt  
    Started by NinjaTrader_Brandon, Today, 10:44 AM
    0 responses
    5 views
    0 likes
    Last Post NinjaTrader_Brandon  
    Started by lwsco, Today, 10:40 AM
    0 responses
    2 views
    0 likes
    Last Post lwsco
    by lwsco
     
    Working...
    X