CalculateMarginType
property
Retrieves a margin type per current account, could be one of exampled: FixedCurrencyValue, FullyPaid, PriceBasedCustomCoef, PriceLimit.
Syntax
public MarginType CalculateMarginType { get; }
Example
using System;
using System.Collections;
using System.Collections.Generic;
using System.Text;
using System.Drawing;
using PTLRuntime.NETScript;
namespace MarginSettingsClassExamples
{
public class MarginSettingsClassExamples : NETStrategy
{
public override void OnQuote()
{
Instrument inst = Instruments.Current;
MarginSettings ms = inst.GetMarginSettings();
//MarginSettings Methods
//GetInitMarginCoefficient
Print(ms.GetInitMarginCoefficient(Operation.Buy,false));
//GetMaintMarginCoefficient
Print(ms.GetMaintMarginCoefficient(Operation.Sell,true));
//MarginSettings Properties
Print(ms.CalculateMarginType);
if(ms.UseLongShortMargin==true)
{
//do some code
}
if(ms.UseOvernightMargin==true)
{
//do some code
}
}
}
}
Discussion
Join PTMC community to post your comments
No comments yet. Be the first.