Beispiel #1
0
 public StopOrderRequest(Instrument.Instrument oandaInstrument)
     : base(oandaInstrument)
 {
     type             = OrderType.Stop;
     timeInForce      = TimeInForce.GoodUntilCancelled;
     triggerCondition = OrderTriggerCondition.Default;
 }
Beispiel #2
0
 public TrailingStopLossDetails(Instrument.Instrument instrument)
 {
    priceInformation = new PriceInformation()
    {
       instrument = instrument,
       priceProperties = new List<string>() { "distance" }
    };
 }
Beispiel #3
0
 public TakeProfitDetails(Instrument.Instrument instrument)
 {
    priceInformation = new PriceInformation()
    {
       instrument = instrument,
       priceProperties = new List<string>() { "price" }
    };
 }
Beispiel #4
0
 public ExitOrderRequest(Instrument.Instrument oandaInstrument)
 {
    priceInformation = new PriceInformation()
    {
       instrument = oandaInstrument,
       priceProperties = new List<string>() { "price" }
    };
 }
 public ExitOrderRequest(Instrument.Instrument oandaInstrument)
 {
     priceInformation = new PriceInformation()
     {
         instrument      = oandaInstrument,
         priceProperties = new List <string>()
         {
             nameof(price)
         },
         unitsProperties = new List <string>()
     };
 }
 public EntryOrderRequest(Instrument.Instrument oandaInstrument)
 {
     instrument       = oandaInstrument.name;
     timeInForce      = TimeInForce.FillOrKill;
     positionFill     = OrderPositionFill.Default;
     priceInformation = new PriceInformation()
     {
         instrument      = oandaInstrument,
         priceProperties = new List <string>()
         {
             "price", "priceBound"
         }
     };
 }
 public TrailingStopLossOrderRequest(Instrument.Instrument oandaInstrument)
     : base(oandaInstrument)
 {
     type = OrderType.TrailingStopLoss;
 }
 public TakeProfitOrderRequest(Instrument.Instrument oandaInstrument)
     : base(oandaInstrument)
 {
     type = OrderType.TakeProfit;
 }
 public LimitOrderRequest(Instrument.Instrument instrument) : base(instrument)
 {
     type = OrderType.Limit;
 }
Beispiel #10
0
 public MarketIfTouchedOrderRequest(Instrument.Instrument oandaInstrument)
     : base(oandaInstrument)
 {
     type = OrderType.MarketIfTouched;
 }
 public PriceEntryOrderRequest(Instrument.Instrument instrument)
     : base(instrument)
 {
     timeInForce      = TimeInForce.GoodUntilCancelled;
     triggerCondition = OrderTriggerCondition.Default;
 }
Beispiel #12
0
 public LimitOrderRequest(Instrument.Instrument instrument) : base(instrument)
 {
     type             = OrderType.Limit;
     timeInForce      = TimeInForce.GoodUntilCancelled;
     triggerCondition = OrderTriggerCondition.Default;
 }
 public StopOrderRequest(Instrument.Instrument oandaInstrument)
     : base(oandaInstrument)
 {
     type = OrderType.Stop;
 }
 public MarketOrderRequest(Instrument.Instrument oandaInstrument)
     : base(oandaInstrument)
 {
     type        = OrderType.Market;
     timeInForce = TimeInForce.FillOrKill;
 }
 public void Process(Instrument.Instrument instrument, double amount)
 {
     SaveIntoDatabase(instrument, amount);
 }
 public void SaveIntoDatabase(Instrument.Instrument instrument, double amount)
 {
     Console.WriteLine("Saving data into database");
 }