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 Kaledus, Today, 01:29 PM
      3 responses
      9 views
      0 likes
      Last Post NinjaTrader_Jesse  
      Started by frankthearm, Yesterday, 09:08 AM
      14 responses
      47 views
      0 likes
      Last Post NinjaTrader_Clayton  
      Started by gentlebenthebear, Today, 01:30 AM
      2 responses
      13 views
      0 likes
      Last Post gentlebenthebear  
      Started by PaulMohn, Today, 12:36 PM
      2 responses
      17 views
      0 likes
      Last Post PaulMohn  
      Started by Conceptzx, 10-11-2022, 06:38 AM
      2 responses
      56 views
      0 likes
      Last Post PhillT
      by PhillT
       
      Working...
      X