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

Order Flow Volume Profile

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

  • avdem
    replied
    Thanks Chris!

    Leave a comment:


  • NinjaTrader_ChrisL
    replied
    Hello Alex, Thanks for your reply.

    If you need to sum up those values, use a for loop to iterate through each price level and have a running total I found this video that shows how to sum numbers with a for loop.

    e.g.

    Code:
    if (Bars == null)
    return;
    
    NinjaTrader.NinjaScript.BarsTypes.VolumetricBarsTy pe barsType = Bars.BarsSeries.BarsType as
    NinjaTrader.NinjaScript.BarsTypes.VolumetricBarsTy pe;
    
    if (barsType == null)
    return;
    
    double TheSum = 0;
    try
    {
    for(int i = -5; i < 5; i++)
    {
    
    Print("Volume at " + (Close[0] + TickSize*i) + " V = " + (barsType.Volumes[CurrentBar].GetTotalVolumeForPrice(Close[0] + TickSize*i)));
    TheSum += (barsType.Volumes[CurrentBar].GetTotalVolumeForPrice(Close[0] + TickSize*i);
    
    }
    Print("");
    }
    catch{}
    All the best wishes!

    Leave a comment:


  • avdem
    replied
    Thanks Chris,
    This solves half of the problem getting the total volume for the week.
    The second part is to get the volume within the price range for the week. For example weekly price range is between 107 and 110 and I need the volume between 108 and 109 for that week.
    From what I understand GetTotalVolumeForPrice gives the volume for a specific price. So is there easy way to get the sum for this range or I would have to get volume for every tick within the range and then sum those?

    Also I'm looking for the week to current moment values, not current week. So if i'm calculating this on Thusday 8:00pm it should take values from previous Thursday 8:00pm to current Thursday 8:00m.

    Thanks,

    Alex
    Last edited by avdem; 05-16-2019, 09:43 PM.

    Leave a comment:


  • NinjaTrader_ChrisL
    replied
    Hello avdem, Thanks for your post, and welcome to the NinjaTrader forum.

    If your inquiry is not related to the thread, please note to make a new thread in the future.

    Your script will need to add a weekly data series and access the Volume series when BarsInProgress == 1. The attached script will print out the weekly volume at the end of every week.

    Please let me know if you have any additional questions.
    Attached Files

    Leave a comment:


  • avdem
    replied
    Hi,
    If i want to get total volume for the week and total volume for the week within a price range inside the automated strategy, how can I code that?
    Thanks.
    Last edited by avdem; 05-15-2019, 08:31 PM.

    Leave a comment:


  • i2w8am9ii2
    replied
    Hi Chris,

    Great. Thanks for the info and code.

    I appreciate it.

    Leave a comment:


  • NinjaTrader_ChrisL
    replied
    Hello i2w8am9ii2,

    Thanks for the reply.

    Yes you can use input parameters to pass in as long it occurs after you initialize the BarsType like in the help guide page:

    Code:
     NinjaTrader.NinjaScript.BarsTypes.VolumetricBarsType barsType = Bars.BarsSeries.BarsType as     
            NinjaTrader.NinjaScript.BarsTypes.VolumetricBarsType;
    Please let me know if I can assist further.

    Leave a comment:


  • i2w8am9ii2
    replied
    Hi Chris,

    Great. Thanks for the link.

    So would we be able to create input parameters for methods/properties such as the following?

    GetAskVolumeForPrice
    GetTotalVolumeForPrice


    Or do such methods/properties (with Get in the front) only provide the volume numbers and cannot be set for use in an input parameter?

    Leave a comment:


  • NinjaTrader_ChrisL
    replied
    Hello i2w8am9ii2,

    Thanks for the reply.

    Here is the documentation on accessing Order Flow Volumetric bars:



    Please let me know if I can assist further.

    Leave a comment:


  • i2w8am9ii2
    replied
    Hi Trader17,

    Thanks for the info.

    That is great.

    Hopefully they will provide the functionality I'm looking for.

    Leave a comment:


  • Trader17
    replied
    Originally posted by NinjaTrader_ChrisL View Post
    Hello Trader17,

    Thank you for the post.

    Currently, Order Flow Volume Profile script access is not supported or documented yet. All documented Indicators will be listed here. There is a feature request to expose the plots of all the OrderFlow tools, I will add your vote to that feature request.

    Please let me know if I can assist further.
    Here is the list so far. Some form Volumetric Bars are included.

    Leave a comment:


  • i2w8am9ii2
    replied
    Hello,

    I have a similar question.

    Are any Values from the Order Flow 'Volumetric Bars' exposed to Ninja Script?

    Leave a comment:


  • Trader17
    replied
    Thank you for adding my vote. Hope it comes out soon!!

    Leave a comment:


  • NinjaTrader_ChrisL
    replied
    Hello Trader17,

    Thank you for the post.

    Currently, Order Flow Volume Profile script access is not supported or documented yet. All documented Indicators will be listed here. There is a feature request to expose the plots of all the OrderFlow tools, I will add your vote to that feature request.

    Please let me know if I can assist further.

    Leave a comment:


  • Trader17
    started a topic Order Flow Volume Profile

    Order Flow Volume Profile

    Are any Values from the Order Flow Volume Profile exposed to Ninja Script? Specifically the Value Area High, Value Area Low and the Point of Control.
    Thank you.

Latest Posts

Collapse

Topics Statistics Last Post
Started by Davidtowleii, Today, 12:15 AM
0 responses
3 views
0 likes
Last Post Davidtowleii  
Started by guillembm, Yesterday, 11:25 AM
2 responses
9 views
0 likes
Last Post guillembm  
Started by junkone, 04-21-2024, 07:17 AM
9 responses
68 views
0 likes
Last Post jeronymite  
Started by trilliantrader, 04-18-2024, 08:16 AM
4 responses
20 views
0 likes
Last Post trilliantrader  
Started by mgco4you, Yesterday, 09:46 PM
1 response
11 views
0 likes
Last Post NinjaTrader_Manfred  
Working...
X