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 charlesugo_1, 05-26-2026, 05:03 PM
          0 responses
          66 views
          0 likes
          Last Post charlesugo_1  
          Started by DannyP96, 05-18-2026, 02:38 PM
          1 response
          149 views
          0 likes
          Last Post NinjaTrader_ChelseaB  
          Started by CarlTrading, 05-11-2026, 05:56 AM
          0 responses
          162 views
          0 likes
          Last Post CarlTrading  
          Started by CarlTrading, 05-10-2026, 08:12 PM
          0 responses
          99 views
          0 likes
          Last Post CarlTrading  
          Started by Hwop38, 05-04-2026, 07:02 PM
          0 responses
          286 views
          0 likes
          Last Post Hwop38
          by Hwop38
           
          Working...
          X