Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

creating new indicator/strategy

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

    creating new indicator/strategy

    Im looking to build an indicator that will plot bid/ask volume as two separate lines. Seems simple enough but dont know where to start. I have lifetime license with orderflow tools but I don't see anything like this in there. Thanks

    #2
    Hello dedouglas,

    The most simple way to do this would be to just configure two indicators to use the Ask and Bid series as their input, you could use a 1 SMA as one example which would essentially just render the ask/bid as plots. This could be done for the VOL indicator as well, SMA 1 on the VOL as input for the ask or Bid series.

    Alternatively you could program this by adding two series and plotting the values. You can find information about plotting in the following link:

    https://ninjatrader.com/support/help...ghtsub=addplot

    And adding series: https://ninjatrader.com/support/help...ghtsub=adddata

    A simple way to plot the values would be something like the following:

    Code:
      if (State == State.SetDefaults)
    {
    
         AddPlot(Brushes.Red, "AskPlot");
         AddPlot(Brushes.Red, "BidPlot");
    }
    Code:
    if (State == State.Configure)
    {
         AddDataSeries("ES 09-19", BarsPeriodType.Minute, 1, MarketDataType.Ask);
         AddDataSeries("ES 09-19", BarsPeriodType.Minute, 1, MarketDataType.Bid);
    }
    Code:
    if(BarsInProgress == 0)
    {
        Values[0][0] = Volumes[1][0];// ask series
        Values[1][0] = Volumes[2][0];// bid series
    }

    I look forward to being of further assistance.
    Last edited by NinjaTrader_Jesse; 08-20-2019, 03:18 PM.
    JesseNinjaTrader Customer Service

    Comment


      #3
      I like the simple idea first. I tried to do the sma set to 1 and then put an ask or bid series to input. However I havent found how to get the input as ask/bid volume. Probably an oversight. Thanks

      Comment


        #4
        Hello dedouglas,

        There are actually a few ways to do this in contrast to indicators. The most simple is actually to use the VOLMA, that combines the first idea into a single step.

        You can apply the VOLMA with 1 period and 1 volatility to achieve a plot of the volume.

        Lets assume you have a Close chart open now. To make this show the Ask or Bid volume you would need to add an Ask or Bid series in addition to the Close series.
        • In the chart, go to the DataSeries menu and add an Ask series.
        • You should now have two sets of bars, you can hide the ask bars later if needed.
        • Open the indicators and apply the VOLMA
          • While configuring the VOLMA make sure to select the Ask series as its Input series.
          • Configure it to use 1 period and 1 volatility
        • This will now represent the Volume from the ask series and will be using the EMA to plot it. The EMA using 1 period is used displaying the data.

        I look forward to being of further assistance.
        JesseNinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by jaybedreamin, Today, 05:56 PM
        0 responses
        3 views
        0 likes
        Last Post jaybedreamin  
        Started by DJ888, 04-16-2024, 06:09 PM
        6 responses
        18 views
        0 likes
        Last Post DJ888
        by DJ888
         
        Started by Jon17, Today, 04:33 PM
        0 responses
        1 view
        0 likes
        Last Post Jon17
        by Jon17
         
        Started by Javierw.ok, Today, 04:12 PM
        0 responses
        9 views
        0 likes
        Last Post Javierw.ok  
        Started by timmbbo, Today, 08:59 AM
        2 responses
        10 views
        0 likes
        Last Post bltdavid  
        Working...
        X