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

Volume Profile Modification

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

    Volume Profile Modification

    Hello All,

    Hope you are doing good.

    What I'm trying to do is to modify Volume Profile Indicator to :
    1) show me volume profie for each day. Right now Volume profile is visible when I move back to previous day
    2) get Bid/Ask Volume Profile where:
    if Ask > Bid plot let say green bar
    if Bid < Ask plot red bar

    It should looks almost the same like Volume Profile but presents the difference between Ask vs Bid

    Could you somehow help me how easly modify mentioned indicator to get above two results?

    Thanks in advance

    #2
    Hello kanarkia,

    Thank you for the post.

    Looking at the code for the Volume Profile, this indicator would not likely be easily modified to do what you are asking without doing some testing. As it is now, the indicator uses OnRender and loops with the session information to determine what to draw. It would also be needed to use TickReplay to see the prior days.

    I see that it may be possible to display the previous days information by including the existing logic in one of the existing loops. You could take a look at line 208 where the break; statement is. This could be replaced by the logic from lines 212 -262, essentially moving the logic to where the break statement currently is. To avoid rendering all of the days, you could add a condition like the following before the logic that was just moved:

    if(firstBarIdxToPaint < ChartBars.FromIndex) break;

    I have included my test for you to further review and expand on. Adding other conditions to the logic such as what values to accumulate or your second question would also be possible. That could also be achieved from OnRender. If you have not used OnRender previously, I would suggest reviewing the SampleCustomRender indicator that comes with NinjaTrader.



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

    Comment


      #3
      Hi,

      Thanks for the answer. Coming days I will take a look on it, and in case of any issues I will not hesitate to ask for further assistance.

      Thanks in advance

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by traderqz, Today, 12:06 AM
      10 responses
      18 views
      0 likes
      Last Post traderqz  
      Started by algospoke, 04-17-2024, 06:40 PM
      5 responses
      46 views
      0 likes
      Last Post NinjaTrader_Jesse  
      Started by arvidvanstaey, Today, 02:19 PM
      1 response
      5 views
      0 likes
      Last Post NinjaTrader_Zachary  
      Started by mmckinnm, Today, 01:34 PM
      3 responses
      5 views
      0 likes
      Last Post NinjaTrader_ChelseaB  
      Started by f.saeidi, Today, 01:32 PM
      2 responses
      8 views
      0 likes
      Last Post f.saeidi  
      Working...
      X