Login Page - Create Account

Support Board


Date/Time: Sat, 04 May 2024 18:17:50 +0000



Post From: ASCIL strategy trades will not reverse positions

[2020-12-19 20:27:01]
User566913 - Posts: 39
Still nothing. Can it be the way I'm sending the orders:
.......
/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
/* Buy Order Function */
/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/

  if (RecentBidVolume > RecentAskVolume)
  {
    int Result = (int)sc.BuyEntry(NewOrder);
    if (Result > 0) //If there has been a successful order entry, then draw an arrow at the low of the bar.
    {
      Subgraph_BuyEntry[sc.Index] = sc.Low[sc.Index];

      // Remember the order IDs for subsequent modification and cancellation
      Target1OrderID = NewOrder.Target1InternalOrderID;
      Stop1OrderID = NewOrder.Stop1InternalOrderID;
    }
  }

/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
  /* Sell Order Function */
/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/

  else if (RecentAskVolume > RecentBidVolume)
  {
    int Result = (int)sc.SellEntry(NewOrder);
    if (Result > 0) //If there has been a successful order entry, then draw an arrow at the high of the bar.
    {
      Subgraph_SellEntry[sc.Index] = sc.High[sc.Index];

      // Remember the order IDs for subsequent modification and cancellation
      Target1OrderID = NewOrder.Target1InternalOrderID;
      Stop1OrderID = NewOrder.Stop1InternalOrderID;
    }
  }