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 sjsj2732, Yesterday, 04:31 AM
          0 responses
          30 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
          282 views
          0 likes
          Last Post argusthome  
          Started by NabilKhattabi, 03-06-2026, 11:18 AM
          0 responses
          132 views
          1 like
          Last Post NabilKhattabi  
          Started by Deep42, 03-06-2026, 12:28 AM
          0 responses
          90 views
          0 likes
          Last Post Deep42
          by Deep42
           
          Working...
          X