FindAll


Summary

Find all positions with this label.

Syntax

public Position[] FindAll(string label)
public Position[] FindAll(string label, Symbol symbol)
public Position[] FindAll(string label, Symbol symbol, TradeType tradeType)

Parameters

NameDescription

Example 1

var positions = Positions.FindAll("myLabel");
foreach (var position in positions)
{
    double? newStopLoss = position.StopLoss ?? 10;
    ModifyPosition(position, newStopLoss, position.TakeProfit);
}