Skip to content

RelativeTakeProfitProtections.FourthTakeProfit

property · RelativeTakeProfitProtections · cAlgo.API Since 5.8

DesktopCLICloud

Gets the fourth partial take profit, if any.

Definition

public RelativeTakeProfitProtection FourthTakeProfit {get;}
relativeTakeProfitProtections.FourthTakeProfit: RelativeTakeProfitProtection

Returns RelativeTakeProfitProtection

Examples

var ladder = new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(10000, 10), new RelativeTakeProfitProtection(10000, 20), new RelativeTakeProfitProtection(10000, 30), new RelativeTakeProfitProtection(10000, 40), new RelativeTakeProfitLastProtection(60));
Print("Fourth take profit: {0} units at {1} pips", ladder.FourthTakeProfit.Volume, ladder.FourthTakeProfit.Distance);
ladder = RelativeTakeProfitProtections(RelativeTakeProfitProtection(10000, 10), RelativeTakeProfitProtection(10000, 20), RelativeTakeProfitProtection(10000, 30), RelativeTakeProfitProtection(10000, 40), RelativeTakeProfitLastProtection(60))
api.Print(f"Fourth take profit: {ladder.FourthTakeProfit.Volume} units at {ladder.FourthTakeProfit.Distance} pips")