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

PVP for volume charts

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

    PVP for volume charts

    Hi
    Below is the code for PVP but that code does not work with volume bars. What is the necessary modification needed to make this work with volume bars ?

    Thanks


    protected override void OnBarUpdate()
    {
    double MaxVolume = 0;
    double MaxPrice = 0.0;
    for (int x = 0; x <= Bars.BarsSinceSession; x++)
    {
    if (Volume[x] > MaxVolume)
    {
    MaxVolume = Volume[x];
    MaxPrice = Close[x];
    }
    }
    PVPLine.Set(MaxPrice);
    }

    #2
    Probably because theoretically all volume chart bars have the same or max volume. Try using the VOL indicator on a Volume chart for a visual representation of what I'm saying. Dan
    Last edited by eDanny; 02-04-2010, 01:00 PM.
    eDanny
    NinjaTrader Ecosystem Vendor - Integrity Traders

    Comment


      #3
      Yes I understand that but I still should be able to graph the PVP.

      Comment


        #4
        You are looking back for a MaxPrice bar that has more volume but all bars have the same volume.
        eDanny
        NinjaTrader Ecosystem Vendor - Integrity Traders

        Comment


          #5
          Ok got it. I did not write this code so I cant figure out how to make this work. Do you have a suggestions ?

          Comment


            #6
            trader413,

            You are running into simply a conceptual issue. The concept of how you are trying to use this code does not work on volume charts for the reason eDanny pointed out. Not sure what exactly you would want fixed because its just concepts that don't relate to each other.
            Josh P.NinjaTrader Customer Service

            Comment


              #7
              Ok. Can you give me any insight as to how I should approach this ? I know it is still posible on a volume chart because i still get a accurate volume profile. So it would be a matter of accessing that information the same way the volume profile does.

              Or should I try getting this information from a regular time chart and print it on my volume chart?

              Comment


                #8
                Any suggestions ?

                Comment


                  #9
                  trader413,

                  You have to make a decision of how you want it to behave and what exactly you want shown. Your original posted code will not work on Volume charts. How you proceed is up to you. You need to decide on the logic you want to use instead.
                  Josh P.NinjaTrader Customer Service

                  Comment

                  Latest Posts

                  Collapse

                  Topics Statistics Last Post
                  Started by mgco4you, Today, 09:46 PM
                  1 response
                  3 views
                  0 likes
                  Last Post NinjaTrader_Manfred  
                  Started by wzgy0920, Today, 09:53 PM
                  0 responses
                  3 views
                  0 likes
                  Last Post wzgy0920  
                  Started by Rapine Heihei, Today, 08:19 PM
                  1 response
                  8 views
                  0 likes
                  Last Post NinjaTrader_Manfred  
                  Started by Rapine Heihei, Today, 08:25 PM
                  0 responses
                  6 views
                  0 likes
                  Last Post Rapine Heihei  
                  Started by f.saeidi, Today, 08:01 PM
                  1 response
                  9 views
                  0 likes
                  Last Post NinjaTrader_Manfred  
                  Working...
                  X