GetMaintAccountCoefficient (Account account)
method
Syntax
public double GetMaintAccountCoefficient (Account account)
Parameters
account — Account
Return
double
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.