Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Filter Bad/Negative Ticks from within Strategy

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

    #16
    i made the refresh/reload command unconditional to Lows and only symbol based:

    if (Instrument.MasterInstrument.Name == "BANKNIFTY_I"
    )
    {
    System.Windows.Forms.SendKeys.Send("^(+R)");
    System.Windows.Forms.SendKeys.Send("{F5}");



    Print(" "+Instrument.FullName+" "+Open[1]+" "+High[1]+" "+Low[1]+" "+Close[1]);
    Print(" "+Instrument.FullName+" "+Open[0]+" "+High[0]+" "+Low[0]+" "+Close[0]);


    }

    Still faced the problems. Image attached.

    Another issue is that even if historical data gets sorted for a moment, incoming tick at which order gets executed, if negative, has no filter

    I can think of a few things to try now:
    1. A Do...Loop function to refresh/reload until lowest low >0 - CAN A DO...LOOP BE CODED IN NT7?
    2. OnMarketData()
    if Last[0] <0
    {
    refresh/reload
    }
    3. Limit Order with Limit price being Last[0]

    --
    if this particular symbol was not that important i would have left it untouched. But somehow, it is very important. Data vendor is working on the issue too but unable to sort it till now.
    Attached Files
    Last edited by piyushc; 07-06-2017, 01:11 PM.

    Comment


      #17
      All other windows refresh, except for the one i need the most.

      Snapshots attached.
      Attached Files

      Comment


        #18
        Hello piyushc,

        Thank you for your response.

        The following should be all you need to use. Can you confirm if you use the following that you still see the same behavior you detailed in your last two posts?
        Code:
        			if (Close[0] < 0)
        			{
        				System.Windows.Forms.SendKeys.Send("^(+R)");
        			}
        I look forward to your response.

        Comment


          #19
          Looks simplistic and sufficient but i'll try that.

          Another issue is the Strategy Execution happens at the incoming tick, how do i sort that if it's negative?

          Options that i thought of:
          1. MarketDataType.Last > 0
          2. Limit Order Execution at Last price

          What's your say on it?

          Or, if you can have any better idea.. please

          Comment


            #20
            Hello piyushc,

            Thank you for your response.

            I would perform the check before anything else in OnBarUpdate. This way the data is reloaded if incorrect before placing any orders or checking any conditions.

            Please let me know if you have any questions.

            Comment

            Latest Posts

            Collapse

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