ChartRiskReward
Summary
Represents the risk reward chart object.
Signature
| public abstract interface ChartRiskReward
|
Namespace
cAlgo.API
Examples
1
2
3
4
5
6
7
8
9
10
11
12
13 | using cAlgo.API;
namespace cAlgo.Robots;
[Robot(AccessRights = AccessRights.None)]
public class TestExample : Robot
{
protected override void OnStart()
{
var riskRewardType = new ChartRiskRewardFixedRiskType(ChartRiskRewardAmountType.EquityPercentage, 1);
var riskReward = Chart.DrawRiskReward("RR", Chart.LastVisibleBarIndex - 10, Chart.LastVisibleBarIndex, Bars.ClosePrices[Chart.LastVisibleBarIndex], OrderType.Market, TradeType.Buy, riskRewardType);
riskReward.IsInteractive = true;
Print($"Name: {riskReward.Name} | Entry: {riskReward.EntryPrice}");
}
}
|
| import clr
clr.AddReference("cAlgo.API")
from cAlgo.API import *
class Test():
def initialize(self):
riskRewardType = ChartRiskRewardFixedRiskType(ChartRiskRewardAmountType.EquityPercentage, 1)
riskReward = api.Chart.DrawRiskReward("RR", api.Chart.LastVisibleBarIndex - 10, api.Chart.LastVisibleBarIndex, api.Bars.ClosePrices[api.Chart.LastVisibleBarIndex], OrderType.Market, TradeType.Buy, riskRewardType)
riskReward.IsInteractive = True
print(f"Name: {riskReward.Name} | Entry: {riskReward.EntryPrice}")
|
Properties
Time1
Summary
Gets or sets the value 1 on the Time line.
Signature
| public abstract DateTime Time1 {get; set;}
|
Return Value
DateTime
Time2
Summary
Gets or sets the value 2 on the Time line.
Signature
| public abstract DateTime Time2 {get; set;}
|
Return Value
DateTime
EntryPrice
Summary
Gets or sets the entry price.
Signature
| public abstract double EntryPrice {get; set;}
|
Return Value
double
StopLossPrice
Summary
Gets or sets the stop loss price.
Signature
| public abstract double StopLossPrice {get; set;}
|
Return Value
double
TakeProfitPrice
Summary
Gets or sets the take profit price.
Signature
| public abstract double TakeProfitPrice {get; set;}
|
Return Value
double
RiskColor
Summary
Gets or sets the risk color.
Signature
| public abstract Color RiskColor {get; set;}
|
Return Value
Color
RiskLineStyle
Summary
Gets or sets the risk line style.
Signature
| public abstract LineStyle RiskLineStyle {get; set;}
|
Return Value
LineStyle
RiskThickness
Summary
Gets or sets the risk line thickness.
Signature
| public abstract int RiskThickness {get; set;}
|
Return Value
int
RewardColor
Summary
Gets or sets the reward color.
Signature
| public abstract Color RewardColor {get; set;}
|
Return Value
Color
RewardLineStyle
Summary
Gets or sets the reward style.
Signature
| public abstract LineStyle RewardLineStyle {get; set;}
|
Return Value
LineStyle
RewardThickness
Summary
Gets or sets the reward thickness.
Signature
| public abstract int RewardThickness {get; set;}
|
Return Value
int
VolumeInUnits
Summary
Gets or sets the volume (in units).
Signature
| public abstract double VolumeInUnits {get; set;}
|
Return Value
double
OrderType
Summary
Gets or sets the order type.
Signature
| public abstract OrderType OrderType {get; set;}
|
Return Value
OrderType
TradeType
Summary
Gets or sets the trade type.
Signature
| public abstract TradeType TradeType {get; set;}
|
Return Value
TradeType
IsFixedRatio
Summary
Gets or sets if risk reward ratio is fixed or not.
Signature
| public abstract bool IsFixedRatio {get; set;}
|
Return Value
bool
IsMarketRange
Summary
Gets or sets if order type is market range.
Signature
| public abstract bool IsMarketRange {get; set;}
|
Return Value
bool
MarketRangePips
Summary
Gets or sets order market range pips amount.
Signature
| public abstract double MarketRangePips {get; set;}
|
Return Value
double
LimitRangePips
Summary
Gets or sets order limit range pips amount.
Signature
| public abstract double LimitRangePips {get; set;}
|
Return Value
double
Type
Summary
Gets or sets type.
Signature
| public abstract ChartRiskRewardType Type {get; set;}
|
Return Value
ChartRiskRewardType
RiskRewardRatio
Summary
Gets or sets risk reward ratio.
Signature
| public abstract double RiskRewardRatio {get; set;}
|
Return Value
double