Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Monday or Tues controlls INITIALIZE

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

    Monday or Tues controlls INITIALIZE

    Does anyone know a way to get the all the adds, Plots, ExitOnClose, BarsRequired, SetProfitTarget...etc stuff you would normally put within initialize under the control for example.... if(Time[0].DayOfWeek == DayOfWeek.Monday)

    so that on Mondays you could have a strategy running based on one customized set of adds inside of initialize and on Tuesday have a totally different set of adds?

    Maybe this is possible using OnStartUp() somehow?

    My goal is to be able to put at least 2 strategies within one algo system that have conflicting settings inside of initialize. but if I can get the conflicting settings to run separately each on a different day so that they will not conflict.

    Any advice is appreciated

    Thanks Quantismo..

    #2
    Hello Quantismo,

    Thank you for your note.

    You would not be able to test for the Time[0] as this has not been built yet on the chart when applying the indicator.

    You can use DateTime.Now.DayOfWeek to compare, however I was not able to resolve this into plugging in the correct values that I wanted for the Initialize() and don't believe there is a workaround.

    Let me know if I can be of further assistance.
    Cal H.NinjaTrader Customer Service

    Comment


      #3
      Thanks for checking

      Yeah I didn't think there was any work around for this but thanks for replying.


      Quantismo

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by argusthome, 03-08-2026, 10:06 AM
      0 responses
      109 views
      0 likes
      Last Post argusthome  
      Started by NabilKhattabi, 03-06-2026, 11:18 AM
      0 responses
      59 views
      0 likes
      Last Post NabilKhattabi  
      Started by Deep42, 03-06-2026, 12:28 AM
      0 responses
      37 views
      0 likes
      Last Post Deep42
      by Deep42
       
      Started by TheRealMorford, 03-05-2026, 06:15 PM
      0 responses
      40 views
      0 likes
      Last Post TheRealMorford  
      Started by Mindset, 02-28-2026, 06:16 AM
      0 responses
      78 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Working...
      X