Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Logic being processed in wrong BIP

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

    Logic being processed in wrong BIP

    In my strategy I use 3 time frames, 1 Day, 1 minute, 1 Tick,

    I have logic using 1 Tick BIP to move a stop to break even,

    Code:
    if(BarsInProgress == tBIP); // 1 Tick BIP
    			{
    				if(mfeStop && mfelist.Count > 19)
    					
    								{
    									p = Convert.ToDouble(mfelist.Count);
    									
    									if( Position.MarketPosition == MarketPosition.Long && High[0] >= longPrice + mfelist[Convert.ToInt16(p * mfePercent / 100 + 1)] * TickSize
    										&& pStop.StopPrice < longPrice)
    									{
    										pStop = ExitLongStop(0, true, Position.Quantity, longPrice, "MFE Stop", "pEntry");
    										
    										if(mfeDraw != true)
    											{
    												DrawDot("mfe draw" + CurrentBar, true, 0, Low[0] - 10 * TickSize, Color.Black);
    												DrawText("mfe" + mfe," " + mfelist[Convert.ToInt16(Convert.ToDouble(mfelist.Count) * mfePercent / 100 + 1)],0,Low[0] - 15 * TickSize,Color.Black);
    											}
    									}
    									
    									else if( Position.MarketPosition == MarketPosition.Short && Low[0] <= shortPrice - mfelist[Convert.ToInt16(p * mfePercent / 100 + 1)]  * TickSize
    										&& pStop.StopPrice > shortPrice)
    									{
    									pStop = ExitShortStop(0, true, Position.Quantity, shortPrice, "MFE Stop", "pEntry");
    										
    									if(mfeDraw != true)
    											{
    												DrawDot("mfe draw" + CurrentBar, true, 0, High[0] + 10 * TickSize, Color.Black);
    												DrawText("mfe" + mfe," w" + mfelist[Convert.ToInt16(Convert.ToDouble(mfelist.Count) * mfePercent / 100 + 1)],0,High[0] + 15 * TickSize, Color.Black);
    											}	
    										
    									}
    However according to the log it is processing the logic on the primary BIP, 1 min, why would this be?

    Here is the error form the log:-

    15/07/2013 14:30:00 Entered internal PlaceOrder() method at 15/07/2013 14:30:00: BarsInProgress=0 Action=Sell OrderType=Stop Quantity=1 LimitPrice=0 StopPrice=143.28 SignalName='MFE Stop' FromEntrySignal='pEntry'
    **NT** A Sell stop order placed at '15/07/2013 14:30:01' has been ignored since the stop price is greater than or equal to close price of the current bar. This is an invalid order and subsequent orders may also be ignored. Please fix your strategy.
    Last edited by GKonheiser; 09-04-2014, 03:55 AM.

    #2
    GKonheiser, what you see is the series the order is submitted to and here you submit explicitly to the primary BIP in your Exit() call.

    Comment


      #3
      So even though the logic is not on the primary series, it still submits to the primary series?

      how do i submit to a different series, ie the 1 Tick series then?

      Comment


        #4
        Correct, it's two separate items

        a) when you submit
        b) to which series you submit

        You designate b) in your overload call -

        ExitLongStop(0, true, Position.Quantity, longPrice, "MFE Stop", "pEntry");

        Comment


          #5
          Sorry I should have checked that. Got it, thanks very much, again : )

          Comment

          Latest Posts

          Collapse

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