保留中の注文

Summary

Provides access to methods of the Pending Orders collection

Signature

1
public abstract interface PendingOrders

Namespace

cAlgo.API

See Also

  • cAlgo.API.PendingOrder

Properties

Item

Signature

1
public abstract PendingOrder Item {get;}

Return Value

PendingOrder

Count

Summary

Total number of pending orders

Signature

1
public abstract int Count {get;}

Return Value

int

Examples

1
 var totalOrders = PendingOrders.Count;

Events

Created

Summary

Occurs when a pending order is created

Signature

1
public abstract event Action<PendingOrderCreatedEventArgs> Created;

Examples

1
 protected override void OnStart()
 {
     PendingOrders.Created += PendingOrdersOnCreated;
     PlaceStopOrder(TradeType.Buy, Symbol, 10000, Symbol.Ask + 10 * Symbol.PipSize);
 }
 private void PendingOrdersOnCreated(PendingOrderCreatedEventArgs args)
 {
     Print("Pending order with id {0} was created", args.PendingOrder.Id);
 }

Modified

Summary

Occurs when a pending order is modified

Signature

1
public abstract event Action<PendingOrderModifiedEventArgs> Modified;

Examples

1
 protected override void OnStart()
 {
     PendingOrders.Modified += PendingOrdersOnModified;
     PlaceStopOrder(TradeType.Sell, Symbol, 10000, Symbol.Bid + 10 * Symbol.PipSize);
 }
 private void PendingOrdersOnModified(PendingOrderModifiedEventArgs args)
 {
     Print("Pending order with id {0} was modified", args.PendingOrder.Id);
 }

Canceled

Summary

Occurs when a pending order is canceled

Signature

1
public abstract event Action<PendingOrderCanceledEventArgs> Canceled;

Examples

1
 protected override void OnStart()
 {
     PendingOrders.Canceled += PendingOrdersOnCanceled;
     PlaceStopOrder(TradeType.Buy, Symbol, 10000, Symbol.Ask + 10 * Symbol.PipSize);
 }
 private void PendingOrdersOnCanceled(PendingOrderCanceledEventArgs args)
 {
     Print("Pending order with id {0} was canceled", args.PendingOrder.Id);
 }

Methods

Get

Summary

Returns the pending order with the specified ID

Signature

1
public PendingOrder Get(int id)

Parameters

idPending order ID

Return Value

PendingOrder

Examples

1
var order = PendingOrders.Get(12345);

Add

Summary

Adds a new pending order to the collection

Signature

1
public abstract void Add(PendingOrder order)

Parameters

orderThe pending order to be added

Examples

1
PendingOrders.Add(order);

Remove

Summary

Removes a pending order from the collection

Signature

1
public void Remove(PendingOrder order)

Parameters

orderThe pending order to be removed

Examples

1
PendingOrders.Remove(order);

Count

Summary

Gets the number of pending orders

Signature

1
public int Count()

Return Value

int

Examples

1
int count = PendingOrders.Count();

Clear

Summary

Removes all pending orders from the collection

Signature

1
public void Clear()

Examples

1
PendingOrders.Clear();

Event Handling

Event Delegates

Summary

Delegates used to handle pending order events

Signature

1
public delegate void PendingOrderEventHandler(PendingOrderEventArgs args);

Examples

1
PendingOrderEventHandler += HandlePendingOrderEvent;

Event Args

Summary

Arguments passed to event handlers for pending order events

Signature

1
public class PendingOrderEventArgs : EventArgs

Examples

1
PendingOrderEventArgs += OnPendingOrderEvent;

Event Handlers

Summary

Methods that handle pending order events

Signature

1
public void OnPendingOrderEvent(PendingOrderEventArgs args)
目次

このページについて