Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Changing PricerMarkers Colors...

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

    Changing PricerMarkers Colors...

    NT7: Code used the switch the a ray at the last price ask or bid.

    NT8: "BarsData.PriceMarkerColor" is gone and I have hunted around in the code and can not find the NT8 replacement code to do this.

    I have similar code in other places that I am doing similar things with so I need access to this behavior.

    Code:
    {
    					Value[0] = newLastPrice;
    					if	(newLastPrice >= bestAsk)
    					{
    					if(bidAskPriceLine)
    					BarsArray[0].BarsData.PriceMarkerColor = askPriceLineColor;
    					Draw.Ray(this, "CurrRay", false, rayLengthLast, newLastPrice, 0, newLastPrice, askPriceLineColor, lineStyleLast, lineWidthLast);
    					}
    					else if	(newLastPrice <= bestBid)
    					{
    					if(bidAskPriceLine)
    					BarsArray[0].BarsData.PriceMarkerColor = bidPriceLineColor;
    					Draw.Ray(this, "CurrRay", false, rayLengthLast, newLastPrice, 0, newLastPrice, bidPriceLineColor, lineStyleLast, lineWidthLast);
    					}
    					else
    					{
    					BarsArray[0].BarsData.PriceMarkerColor = lastPriceLineColor;
    					Draw.Ray(this, "CurrRay", false, rayLengthLast, newLastPrice, 0, newLastPrice, lastPriceLineColor, lineStyleLast, lineWidthLast);
    					}
    				}

    #2
    BarsData and other chart related methods have been moved to the ChartBars class: data series related options you'll find in the bars properties collection:

    ChartBars.Properties.PriceMarker.Background
    MatthewNinjaTrader Product Management

    Comment


      #3
      Thank you...

      this is just fluff to make the post long enough to post.

      Comment


        #4
        this is the original code from nt7:
        BarsArray[0].BarsData.PriceMarkerColor = askPriceLineColor;

        this bit of code has been been changed and moved into the code just behind the old sample.
        BarsData.PriceMarkerColor => ChartBars.Properties.PriceMarker.Background

        here is the issue that i still have, I have not been able to get the line of code to work to change the price maker colours.

        before in nt7 BarsArray[0] was a part of the solution of code to work to have the marker change in colour. Now I have not been able to find the rest of the logic to put it all together, i have been hunting and pecking but the solution is not apparent, i know the current code base it is possible to switch the price maker as it can be done in chart properties, but to have a indicator do it to match if the ask or the bid is equal to last price, i have not been able to locate intellisense method call, the solution to having the colour change programmatically.

        Thanks.

        Comment


          #5
          The attached script will change the price marker for the primary chart bars that the indicator is running. This is working without issues on my end. Please let me know if this is not working for you, or if there is some concept of your goal I am missing and I'll see what can be done.
          Attached Files
          MatthewNinjaTrader Product Management

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by Option Whisperer, Today, 09:55 AM
          1 response
          11 views
          0 likes
          Last Post bltdavid  
          Started by port119, Today, 02:43 PM
          0 responses
          1 view
          0 likes
          Last Post port119
          by port119
           
          Started by Philippe56140, Today, 02:35 PM
          0 responses
          3 views
          0 likes
          Last Post Philippe56140  
          Started by 00nevest, Today, 02:27 PM
          0 responses
          2 views
          0 likes
          Last Post 00nevest  
          Started by Jonafare, 12-06-2012, 03:48 PM
          5 responses
          3,986 views
          0 likes
          Last Post rene69851  
          Working...
          X