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;
    		}

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Tim-c, Today, 02:10 PM
    1 response
    7 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by Taddypole, Today, 02:47 PM
    0 responses
    2 views
    0 likes
    Last Post Taddypole  
    Started by chbruno, 04-24-2024, 04:10 PM
    4 responses
    50 views
    0 likes
    Last Post chbruno
    by chbruno
     
    Started by TraderG23, 12-08-2023, 07:56 AM
    10 responses
    400 views
    1 like
    Last Post beobast
    by beobast
     
    Started by lorem, Yesterday, 09:18 AM
    5 responses
    25 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Working...
    X