Candlesticks to represent contracts instead of time

 
I want to know is there an indicator or expert advisor in mt5 that can show candles by contracts e.g. one candle to represent 1000 contracts of any forex pair, metal, energy, etc. ??? If not can it be coded in MT5???
 This is because trend lines are more accurate when bars represent contracts rather than time frames.
 

I'm not really sure what you are asking. It sound like you are asking about tick charts or fixed volume charts.

Whatever the case, many non-timeframe based charts can be created by the use of "Custom Symbols". Examples are Renko, Constant Range Bars, etc.

Articles

Custom symbols: Practical basics

Stanislav Korotky, 2020.11.30 08:27

The article is devoted to the programmatic generation of custom symbols which are used to demonstrate some popular methods for displaying quotes. It describes a suggested variant of minimally invasive adaptation of Expert Advisors for trading a real symbol from a derived custom symbol chart. MQL source codes are attached to this article.

Articles

Creating and testing custom symbols in MetaTrader 5

MetaQuotes, 2017.09.21 12:52

Creating custom symbols pushes the boundaries in the development of trading systems and financial market analysis. Now traders are able to plot charts and test trading strategies on an unlimited number of financial instruments.
 
I guess it's for you to find out what kind of data feed is provided by the brokers API if you've connected some options or futures broker. Note that most MQL5 programmers deal with the forex market where contracts aren't used.
 
Fernando Carreiro #:

I'm not really sure what you are asking. It sound like you are asking about tick charts or fixed volume charts.

Whatever the case, many non-timeframe based charts can be created by the use of "Custom Symbols". Examples are Renko, Constant Range Bars, etc.

Thanks Fernando,

I was able to generate equal volume bar charts using the EA equalvolumebars.mq5. However, it only generates charts for past 3 months. Is there a way i can get it to generate equal volume bar chart for 1 year for example?
 
Ali Sikandar Butt #: equalvolumebars.mq5

That program uses historical tick data to produce the "Equal Volume Bars", so it depends on how far back your broker supplies that data.

Some brokers offer more tick data and others less. it depends on the broker and the type of account.

You could modify the program to use M1 data instead of tick data, to go further back, but then the "Equal Volume Bars" would be less accurate.

Reason: