Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

BarsSinceEntry

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

    BarsSinceEntry

    Hello, i would like to ask if it is possible to use the BarsSinceEntry, and use the bars of a smaller period. example. i entered in the 5 minute chart, but i want to wait for the calculations until the 2 minute bars is closed.
    so.
    Last edited by Qualitiedx; 09-22-2011, 04:16 AM.

    #2
    Qualitiedx, this would not be possible if it's the same instrument you use here, as the index returned would be tied to the primary series available for the instrument you run on. In your case this could be solved with a custom count for the second series.

    Comment


      #3
      Hello, thanks for the advice!
      I have also noticed that the real entry point in my strategy is way much higher than the actual priceaction ( candlestick).
      i have 0 slippage. please have a look at the picture i attatched.
      Thanks in advance!




      Comment


        #4
        What order type are you using here? If those are realtime / sim executions then this could be expected as you're trading with the realtime spread here figured in - which is not the case per default in backtesting.

        Comment


          #5
          i use entryshort and entrylong !but is this reasonable for the bid and the ask to have so huge a difference at the EUR/USD?just look at the last trade!


          ps.i know i should use limitorder i am now in development of it

          thank you!

          Comment


            #6
            Qualitiedx, it seems steep I agree, if you compare to your Control Center Level 1 data window for the EURUSD - what a spread do you see there? What broker / dataprovider are you working with then?

            Thanks,

            Comment


              #7
              i use interactive brokers and i see half a pip!(offcourse with ib)
              Lets assume that this may be a bug of information, charting or whatever.
              if you go live, such execution would never be executed so high!maybe it would be 'shown' that much high, but the actual price would be where you really expected it?

              Comment


                #8
                Qualitiedx, I would try synching your PC clock and then rechecking as for IB your data stamping and execution timestamping would be affected here, so it could be also just a visual mismatch you see. If you send a market order it would be executed at whatever price you get via your broker, a limit order would offer more control here.

                Comment


                  #9
                  Hey Bertrand, my clock is synced correctly!i re-synced it just to be sure.

                  Anyway, i need to show you one more pic and you can tell me if this is a usual thing..
                  again, i have zero commission and slipage!

                  i have inserted this code inside the strategy
                  "Print("Open PnL: " + Position.GetProfitLoss(Close[0], PerformanceUnit.Currency));"

                  which is the code for the unrealised PnL if i am correct.
                  but the unrealised PnL as you can see in the code is 75 and the unrealised PnL above, and inside ninja is 55..which is too huge of a difference when you try to scalp!
                  which one is the correct?
                  thank you for your time.

                  Comment


                    #10
                    Qualitiedx, correct that would give you the current open profit calculated with the close price as base - under your Tools > Options in the Control Center : is 'use last price for PnL' checked or not for your setup?

                    Comment


                      #11
                      Yes 'use last price for PnL' is enabled!

                      Comment


                        #12
                        Ok, is the script then ran on CalculateOnBarClose = false so updates would be seen on each tick?

                        Comment


                          #13
                          Yes the strategy is being run on CalculateOnBarClose = false...
                          "Live" as i like to say it

                          Comment


                            #14
                            I checked into on my setup here and was unable to reproduce this big of a difference between the prints and the position tab, please see my screenshot attached, the very minor effect you see is rounding comparing the two. Could you perhaps email me your test strategy to support at ninjatrader dot com - I would be glad to have it a run here?

                            One more thing: for IB you're running on halfPip as pip setting under Tools > Options > Data, correct?
                            Attached Files

                            Comment


                              #15
                              Unfortunately i am not allowed to send over this strategy!And if i do, you will be needing the custom indicators which i am also not allowed to share at this time!maybe in the future i will post them in the forum section!

                              So, the "Use last price for pnl" should be checked or not?maybe it's a timezone issue?
                              i am from greece i don't know if you ever encountered anything like that in the past with anyone frome greece!

                              btw i just noticed that when this is UNchecked there is a 10$ difference between tha strategys pnl and the pnl of the control center!
                              Last edited by Qualitiedx; 09-23-2011, 01:58 PM.

                              Comment

                              Latest Posts

                              Collapse

                              Topics Statistics Last Post
                              Started by Geovanny Suaza, 02-11-2026, 06:32 PM
                              0 responses
                              599 views
                              0 likes
                              Last Post Geovanny Suaza  
                              Started by Geovanny Suaza, 02-11-2026, 05:51 PM
                              0 responses
                              345 views
                              1 like
                              Last Post Geovanny Suaza  
                              Started by Mindset, 02-09-2026, 11:44 AM
                              0 responses
                              103 views
                              0 likes
                              Last Post Mindset
                              by Mindset
                               
                              Started by Geovanny Suaza, 02-02-2026, 12:30 PM
                              0 responses
                              558 views
                              1 like
                              Last Post Geovanny Suaza  
                              Started by RFrosty, 01-28-2026, 06:49 PM
                              0 responses
                              558 views
                              1 like
                              Last Post RFrosty
                              by RFrosty
                               
                              Working...
                              X