NexusFi: Find Your Edge


Home Menu

 





ACSIL: a function that returns the price with the highest volume within a bar


Discussion in Sierra Chart

Updated
      Top Posters
    1. looks_one yonatan with 6 posts (0 thanks)
    2. looks_two Big Mike with 2 posts (0 thanks)
    3. looks_3 vegasfoster with 2 posts (1 thanks)
    4. looks_4 omaha786 with 2 posts (1 thanks)
      Best Posters
    1. looks_one Ymmv with 1 thanks per post
    2. looks_two slickiam with 1 thanks per post
    3. looks_3 vegasfoster with 0.5 thanks per post
    4. looks_4 omaha786 with 0.5 thanks per post
    1. trending_up 9,998 views
    2. thumb_up 4 thanks given
    3. group 8 followers
    1. forum 16 posts
    2. attach_file 1 attachments




 
Search this Thread
  #1 (permalink)
 yonatan 
Haifa Israel
 
Experience: Beginner
Platform: sierra chart
Broker: Optimus Trading Group/Rithmic
Trading: es
Posts: 91 since Apr 2012
Thanks Given: 50
Thanks Received: 71

I am looking for a function that returns the price with the highest volume within a bar. I am trying to figure out away to get this using the sc.VolumeAtPriceForBars member but any idea will be appreciated.


Started this thread Reply With Quote

Can you help answer these questions
from other members on NexusFi?
Kharg Island at 6%, Regime Fall at 1.5% -- The Black Swa …
Prediction Markets & Event Contracts
Iran Peace Expired NO: Ceasefire on Life Support, OPEC a …
Prediction Markets & Event Contracts
April 2026 Jobs Report: +115k vs +65k Expected
Traders Hideout
Topstep Acquires The Futures Desk -- Prop Firm Consolida …
Funded Trading Evaluation Firms
TradingView Deploys AI to Monitor SEC Filings in Real Ti …
TradingView
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Sober Journey With S&P
24 thanks
2026 Jlab journal
10 thanks
Trying to learn Volume and price action correlation
7 thanks
Algo automated / semi-automated trading anyone?
6 thanks
Lady Vols Primer: Trading Volatility Journal
6 thanks
  #3 (permalink)
 vegasfoster 
las vegas
 
Experience: Intermediate
Platform: Sierra Chart
Broker: Velocity/IB
Trading: 6E
Posts: 1,145 since Feb 2010
Thanks Given: 304
Thanks Received: 845


I have not done it before in SC, but there is a number of bars since highest/lowest function, so you may try

int NumBars = sc.NumberOfBarsSinceHighestValue(sc.BaseDataIn[SC_VOLUME], PERIOD);

or

int NumBars = sc.NumberOfBarsSinceLowestValue(sc.BaseDataIn[SC_VOLUME], PERIOD);

to determine the bar index then use sc.High[sc.Index - NumBars]. You may have to adjust by +/-1 bar, not for certain.


Reply With Quote
Thanked by:
  #4 (permalink)
 yonatan 
Haifa Israel
 
Experience: Beginner
Platform: sierra chart
Broker: Optimus Trading Group/Rithmic
Trading: es
Posts: 91 since Apr 2012
Thanks Given: 50
Thanks Received: 71

Thanks vegasfoster. I will look into it.

I'm taking my first steps with ACSIL and C++ so I will probably have to break my teeth with some new terms before I understand the sc.NumberOfBarsSinceLowestValue() function.

I am very happy that I found this Sierra programming section here at NexusFi (formerly BMT) and I am hoping to see more action here.


Started this thread Reply With Quote
  #5 (permalink)
 vegasfoster 
las vegas
 
Experience: Intermediate
Platform: Sierra Chart
Broker: Velocity/IB
Trading: 6E
Posts: 1,145 since Feb 2010
Thanks Given: 304
Thanks Received: 845


yonatan View Post
I am hoping to see more action here.

You and me both, unfortunately, it's hard to compete with free.


Reply With Quote
  #6 (permalink)
 yonatan 
Haifa Israel
 
Experience: Beginner
Platform: sierra chart
Broker: Optimus Trading Group/Rithmic
Trading: es
Posts: 91 since Apr 2012
Thanks Given: 50
Thanks Received: 71


vegasfoster View Post
You and me both, unfortunately, it's hard to compete with free.


Started this thread Reply With Quote
  #7 (permalink)
 
Big Mike's Avatar
 Big Mike 
Manta, Ecuador
Site Administrator
Developer
Swing Trader
 
Experience: Advanced
Platform: Custom solution
Broker: IBKR
Trading: Stocks & Futures
Frequency: Every few days
Duration: Weeks
Posts: 50,669 since Jun 2009
Thanks Given: 33,669
Thanks Received: 102,557


yonatan View Post
I am very happy that I found this Sierra programming section here at NexusFi (formerly BMT) and I am hoping to see more action here.

The more you guys contribute, the more likely we will attract additional coders. So please help

Mike




We're here to help: just ask the community or contact our Help Desk

Quick Links: Change your Username or Register as a Vendor
Searching for trading reviews? Review this list
Lifetime Elite Membership: Sign-up for only $149 USD
Exclusive money saving offers from our Site Sponsors: Browse Offers
Report problems with the site: Using the NexusFi changelog thread
Follow me on X Visit my NexusFi Trade Journal Reply With Quote
  #8 (permalink)
 yonatan 
Haifa Israel
 
Experience: Beginner
Platform: sierra chart
Broker: Optimus Trading Group/Rithmic
Trading: es
Posts: 91 since Apr 2012
Thanks Given: 50
Thanks Received: 71


Big Mike View Post
The more you guys contribute, the more likely we will attract additional coders. So please help

Mike

absolutely :-)


Started this thread Reply With Quote
  #9 (permalink)
 Ymmv 
Poquoson VA USA
 
Experience: Advanced
Platform: Proprietary
Trading: Futures, Crypto
Posts: 17 since Jun 2010
Thanks Given: 6
Thanks Received: 9


yonatan View Post
I am looking for a function that returns the price with the highest volume within a bar. I am trying to figure out away to get this using the sc.VolumeAtPriceForBars member but any idea will be appreciated.

I uploaded a study that should do what you want (source provided). Let me know if I misinterpreted and you need something different.

https://nexusfi.com/download/sierra_chart/1195-download.html?view

Note that I cross compile from Linux using GCC so let me know if it doesn't work using the SC compiler.


Reply With Quote
Thanked by:
  #10 (permalink)
 yonatan 
Haifa Israel
 
Experience: Beginner
Platform: sierra chart
Broker: Optimus Trading Group/Rithmic
Trading: es
Posts: 91 since Apr 2012
Thanks Given: 50
Thanks Received: 71



Ymmv View Post
I uploaded a study that should do what you want (source provided). Let me know if I misinterpreted and you need something different.

https://nexusfi.com/download/sierra_chart/1195-download.html?view

This is Great Ymmv much thanks.

What I need is just the value of the price with the highest volume within a bar and I can now get it from your code (MaxVolume = p_VolumeAtPriceAtIndex->Volume;).

Your code will also help me get a better understanding of the sc.VolumeAtPriceForBars.

Great and thanks again.


Started this thread Reply With Quote




Last Updated on October 12, 2019


© 2026 NexusFi®, s.a., All Rights Reserved.
Av Ricardo J. Alfaro, Century Tower, Panama City, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada)
All information is for educational use only and is not investment advice. There is a substantial risk of loss in trading commodity futures, stocks, options and foreign exchange products. Past performance is not indicative of future results.
About Us - Contact Us - Site Rules, Acceptable Use, and Terms and Conditions - Downloads - Top
no new posts