• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

how to insert checkbox as market analyser column

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    how to insert checkbox as market analyser column

    I copied the info from notes column and I have a editable textbox in market analyser. can you guide me on how to get a checkbox in a market analyser column?
    and also, how can I retrieve the property of an existing market analyser column programmatically? I have the notes column customized. but I want to run some scans based on this column value. how can I retrieve the value programmatically so I can do a quick cross above or cross below comparision.
    Code:
    public class CrossAbove : MarketAnalyzerColumn
    	{
    		
    			protected override void OnStateChange()
    		{if (State == State.SetDefaults)
    			{
    				Description				= "crossabove";
    				Name					=  "crossabove";
    				IsDataSeriesRequired	= false;
    				DataType				= typeof(string);
    				IsEditable				= true;
    			}
    		}
    		
    		 
    	protected override void OnMarketData(Data.MarketDataEventArgs marketDataUpdate)
    		{
    			int a;
    //			  if (marketDataUpdate.MarketDataType == MarketDataType.Ask   )
    //			  {
    //				  Print(DateTime.Now + marketDataUpdate.Instrument.FullName  + marketDataUpdate.Instrument.MasterInstrument.FormatPrice(marketDataUpdate.Price) + "Crossed below ask" + mobject.ask );
    //			  }
    			  
    		}
    Last edited by junkone; 05-01-2016, 05:21 PM.

    #2
    Hello junkone,

    Thank you for your post.

    I will continue to look into how to add a CheckBox to the Column.

    The Columns themselves do not have an exposed value that can be called. So setting a value in a DataType of string would not mean we can pull that value. We could also not pull an Editable (IsEditable = true) column in the Alerts of the Market Analyzer.
    Only way we could input a value and then compare it against other columns in Alerts is in the following manner:
    Code:
    		protected override void OnStateChange()
    		{
    			if (State == State.SetDefaults)
    			{
    				Description							= @"Enter the description for your new custom Market Analyzer Column here.";
    				Name								= "TestStringInput";
    				Calculate							= Calculate.OnPriceChange;
    				MyString					= "1500";
    				IsDataSeriesRequired	= false;
    				DataType				= typeof(string);
    				IsEditable				= false;
    			}
    			else if (State == State.Configure)
    			{
    			}
    		}
    		
    		protected override void OnMarketData(Data.MarketDataEventArgs marketDataUpdate)
    		{
    			CurrentText = MyString;
    		}
    Patrick H.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Ousher, Yesterday, 11:56 PM
    0 responses
    6 views
    0 likes
    Last Post Ousher
    by Ousher
     
    Started by djt1102, Yesterday, 07:55 PM
    1 response
    9 views
    0 likes
    Last Post NinjaTrader_Marco  
    Started by jleira, Yesterday, 10:26 PM
    0 responses
    4 views
    0 likes
    Last Post jleira
    by jleira
     
    Started by wuileng, Yesterday, 10:14 PM
    0 responses
    6 views
    0 likes
    Last Post wuileng
    by wuileng
     
    Started by mntemel, Yesterday, 09:07 PM
    1 response
    10 views
    0 likes
    Last Post MojoJojo  
    Working...
    X