ChartPriceAxisPosition
enum cAlgo.API Since 5.10
DesktopCLICloud
Represents the side of the chart where the price axis is displayed.
Definition
public enum ChartPriceAxisPosition
Namespace: cAlgo.API · Group: Chart
Examples
using cAlgo.API;
namespace cAlgo
{
// This example shows how to use the Chart ChartPriceAxisPosition
public partial class ChartPriceAxisPositionSample : Indicator
{
protected override void Initialize()
{
Chart.PriceAxisPosition = Chart.PriceAxisPosition == ChartPriceAxisPosition.Right
? ChartPriceAxisPosition.Left
: ChartPriceAxisPosition.Right;
Print("Price axis position: {0}", Chart.PriceAxisPosition);
}
public override void Calculate(int index)
{
}
}
}
import clr
clr.AddReference("cAlgo.API")
from cAlgo.API import *
class Test():
def initialize(self):
if api.Chart.PriceAxisPosition == ChartPriceAxisPosition.Right:
api.Chart.PriceAxisPosition = ChartPriceAxisPosition.Left
else:
api.Chart.PriceAxisPosition = ChartPriceAxisPosition.Right
print(f"Price axis position: {api.Chart.PriceAxisPosition}")
{
"AccessRights": "None",
"TimeZone": "UTC",
"IsOverlay": true
}
Values
| Name | Value | Description |
|---|---|---|
Right | 0 | The price axis is displayed on the right side of the chart. |
Left | 1 | The price axis is displayed on the left side of the chart. |