I'm developing an indicator which will place trades using CreateOrder(). For this I need to choose an account for trade (like sim101). What I need is to add the account selector in the indicator parameter settings so that I can choose an account while applying indicator on a chart. I have tried the following code which compiles successfully but crashes NT8 when I try to load the indicator on the chart instead of the listing available accounts in my Ninja. I feel I'm missing something due to which the end result is not achieved. Here is the code I included for this:
#region Properties
[NinjaScriptProperty]
[XmlIgnore]
[Display(Name="My Account", Order=1, GroupName="Parameters")]
public AccountSelector AS
{
get {return AS;}
set{AS = new AccountSelector() ;}
}
#endregion
I request you to advise/help me on this issue. Thanks for your time and consideration.
Comment