Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Help with mulit time frame

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

    #16
    Originally posted by NinjaTrader_Cal View Post
    Hello,

    If you are wanting just the current day and session you would need to filter out our condition for the most current day.

    if(Time[0] == DateTime.Today)
    ok added that in but it doesnt return any values. I either get too many days with the wrong sma number or nothing at all

    Comment


      #17
      Hello superhaze421,

      Thank you for your response.

      Please right click in your chart and select Data Series > then set the DaysToLoad to more than 20 days and not 10. You are running a 20 period SMA on the Daily bars, this means we need at least 20 days loaded on the chart.

      Comment


        #18
        Originally posted by NinjaTrader_PatrickH View Post
        Hello superhaze421,

        Thank you for your response.

        Please right click in your chart and select Data Series > then set the DaysToLoad to more than 20 days and not 10. You are running a 20 period SMA on the Daily bars, this means we need at least 20 days loaded on the chart.
        ok I loaded 20 days, I also lowed it form a 20 period to a 5 period SMA,
        this is what it returns. Correct open prices for the session start but wrong SMA

        Session Start: 6/29/2014 3:00:00 PM Open Price 105.72 SMA Value 105.76
        Session Start: 6/30/2014 3:00:00 PM Open Price 105.39 SMA Value 105.76
        Session Start: 7/1/2014 3:00:00 PM Open Price 105.34 SMA Value 105.76
        Session Start: 7/2/2014 3:00:00 PM Open Price 104.29 SMA Value 105.76
        Session Start: 7/3/2014 3:00:00 PM Open Price 104.01 SMA Value 105.76
        Session Start: 7/6/2014 3:00:00 PM Open Price 103.76 SMA Value 105.76
        Session Start: 7/7/2014 3:00:00 PM Open Price 103.47 SMA Value 105.76
        Session Start: 7/8/2014 3:00:00 PM Open Price 103.49 SMA Value 105.76

        Only need the most current

        i tried if(Time[0] == DateTime.Today) and nothing gets returned

        All i need is the open from the 5min base period, and the correct SMA value from the daily chart at the start of each new session for CL.

        Comment


          #19
          Hello superhaze421,

          Thank you for your response.

          Can you attach your full .cs file for this indicator to your response? You can find the file in the following directory on your PC: (My) Documents\NinjaTrader 7\bin\Custom\Indicator

          Comment


            #20
            Originally posted by NinjaTrader_PatrickH View Post
            Hello superhaze421,

            Thank you for your response.

            Can you attach your full .cs file for this indicator to your response? You can find the file in the following directory on your PC: (My) Documents\NinjaTrader 7\bin\Custom\Indicator
            ok thank you, attached
            Attached Files

            Comment


              #21
              Hello superhaze421,

              Thank you for your response.

              I set the Days To Load to 300 and got the following output for the last few weeks:
              Session Start: 6/24/2014 4:00:00 PM Open Price 1942.25 SMA Value 1949.75
              Session Start: 6/25/2014 4:00:00 PM Open Price 1948.75 SMA Value 1949.85
              Session Start: 6/26/2014 4:00:00 PM Open Price 1948.25 SMA Value 1949.55
              Session Start: 6/29/2014 4:00:00 PM Open Price 1951.75 SMA Value 1949.3
              Session Start: 6/30/2014 4:00:00 PM Open Price 1954.5 SMA Value 1949.2
              Session Start: 7/1/2014 4:00:00 PM Open Price 1966.25 SMA Value 1953.7
              Session Start: 7/2/2014 4:00:00 PM Open Price 1968 SMA Value 1957.35
              Session Start: 7/3/2014 4:00:00 PM Open Price 1977 SMA Value 1963.1
              Session Start: 7/6/2014 4:00:00 PM Open Price 1975.75 SMA Value 1963.1
              Session Start: 7/7/2014 4:00:00 PM Open Price 1970.5 SMA Value 1966.9
              Session Start: 7/8/2014 4:00:00 PM Open Price 1960.5 SMA Value 1968.5
              Session Start: 7/9/2014 4:00:00 PM Open Price 1967.5 SMA Value 1968.8
              Session Start: 7/10/2014 4:00:00 PM Open Price 1957.25 SMA Value 1966.8
              Session Start: 7/13/2014 4:00:00 PM Open Price 1962.75 SMA Value 1963.8
              Session Start: 7/14/2014 4:00:00 PM Open Price 1971.25 SMA Value 1963.8
              Session Start: 7/15/2014 4:00:00 PM Open Price 1968 SMA Value 1965.3
              Session Start: 7/16/2014 4:00:00 PM Open Price 1971.25 SMA Value 1966.8
              Session Start: 7/17/2014 4:00:00 PM Open Price 1949.25 SMA Value 1965.95
              Session Start: 7/20/2014 4:00:00 PM Open Price 1970.25 SMA Value 1967.75
              Session Start: 7/21/2014 4:00:00 PM Open Price 1965.75 SMA Value 1966.8
              Session Start: 7/22/2014 4:00:00 PM Open Price 1973 SMA Value 1968.2

              Comment


                #22
                Originally posted by NinjaTrader_PatrickH View Post
                Hello superhaze421,

                Thank you for your response.

                I set the Days To Load to 300 and got the following output for the last few weeks:
                Ok, how to i get only 1 day. For example if i start the strategy at 11:00am to only print once the new session starts

                Comment


                  #23
                  Hello superhaze421,

                  Thank you for your response.

                  As the SMA in this case is a 20 period, it needs 20 days of data to determine the SMA's current value. BarsRequired are 20 as well, so you would need at least 41 days to load (contrary to my earlier statement of only 20 days to load).

                  Comment

                  Latest Posts

                  Collapse

                  Topics Statistics Last Post
                  Started by sjsj2732, Yesterday, 04:31 AM
                  0 responses
                  32 views
                  0 likes
                  Last Post sjsj2732  
                  Started by NullPointStrategies, 03-13-2026, 05:17 AM
                  0 responses
                  286 views
                  0 likes
                  Last Post NullPointStrategies  
                  Started by argusthome, 03-08-2026, 10:06 AM
                  0 responses
                  283 views
                  0 likes
                  Last Post argusthome  
                  Started by NabilKhattabi, 03-06-2026, 11:18 AM
                  0 responses
                  133 views
                  1 like
                  Last Post NabilKhattabi  
                  Started by Deep42, 03-06-2026, 12:28 AM
                  0 responses
                  91 views
                  0 likes
                  Last Post Deep42
                  by Deep42
                   
                  Working...
                  X