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 pibrew, Today, 06:37 AM
      0 responses
      0 views
      0 likes
      Last Post pibrew
      by pibrew
       
      Started by rbeckmann05, Yesterday, 06:48 PM
      1 response
      12 views
      0 likes
      Last Post bltdavid  
      Started by llanqui, Today, 03:53 AM
      0 responses
      6 views
      0 likes
      Last Post llanqui
      by llanqui
       
      Started by burtoninlondon, Today, 12:38 AM
      0 responses
      11 views
      0 likes
      Last Post burtoninlondon  
      Started by AaronKoRn, Yesterday, 09:49 PM
      0 responses
      15 views
      0 likes
      Last Post AaronKoRn  
      Working...
      X