QuestionAny ideas which "Volume" this is?

1
I stumbled across a strategy yesterday, but it is a TradingView strategy
it uses Heiken Ashi and Volume.

just put the indicator "Volume" on the chart and switch to Heiken Ashi.

if a volume bar is green and above a previous red bar then enter long
if a volume bar is red and above a previous green bar then enter short

it seems pretty powerful, but it has not been made for MT4 and i'm trying to make it in MT4

NB : in MT4 a Volume bar is red f it is lower than previous bar, that's not what we want, we want the same volume as in TV but I'm not sure of the code.

any help is welcome
thanks

examples of trades: (yes I know HA is not real price blah blah)
Jeff


Re: Any ideas which "Volume" this is?

2
ionone wrote: Mon Jan 17, 2022 1:09 am Jeff
I don't know whether that is true but someone wrote:
The Hariprasath volume indicator is a nice variation of the TradingView volume indicator by the looks of things. The closest thing on MT4 (but different design) is the Better Volume indicator I think. Put them on a chart alongside each other and you can see the similarities and differences.

Re: Any ideas which "Volume" this is?

3
josi wrote: Mon Jan 17, 2022 1:23 am I don't know whether that is true but someone wrote:
The Hariprasath volume indicator is a nice variation of the TradingView volume indicator by the looks of things. The closest thing on MT4 (but different design) is the Better Volume indicator I think. Put them on a chart alongside each other and you can see the similarities and differences.
thanks
I think the TV volume is different when HA is switched on, which adds a level of complexity
These users thanked the author ionone for the post:
josi

Re: Any ideas which "Volume" this is?

4
ionone wrote: Mon Jan 17, 2022 1:27 am thanks
I think the TV volume is different when HA is switched on, which adds a level of complexity
is this same are you looking for !!!
see chart sub window name if it can covert to mt5 to mt4.

Code: Select all

//+-------------------------------------------------------------------------------------+
//|                                                            Minions.BetterVolume.mq5 |
//| (CC) Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License|
//|                                                          http://www.MinionsLabs.com |
//+-------------------------------------------------------------------------------------+


//+------------------------------------------------------------------+
//| Descriptors                                                      |
//+------------------------------------------------------------------+
#property copyright   "www.MinionsLabs.com"
#property link        "http://www.MinionsLabs.com"
#property version     "1.0"
#property description "Minions in the quest for explaining Volume in a better way."
#property description " "
#property description "(CC) Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License"


//+------------------------------------------------------------------+
//| Indicator Settings                                               |
//+------------------------------------------------------------------+
#property indicator_separate_window
#property indicator_buffers 2
#property indicator_plots   1

#property indicator_label1  "Better Volume"
#property indicator_type1   DRAW_COLOR_HISTOGRAM
#property indicator_color1  C'20,20,20', clrLime, clrRed
#property indicator_style1  STYLE_SOLID
#property indicator_width1  4



//+------------------------------------------------------------------+
//| INPUT Parameters                                                 |
//+------------------------------------------------------------------+
input ENUM_APPLIED_VOLUME inpAppliedVolume  = VOLUME_REAL; // Volume Type
input int                 inpBarsToAnalyze  =  20;         // N past bars to analyze



//+------------------------------------------------------------------+
//| Global Variables                                                 |
//+------------------------------------------------------------------+
double bufferVolume[];
double bufferColors[];

// safe check & clean all Input Parameters... just in case this indicator is called via iCustom()...
ENUM_APPLIED_VOLUME  paramAppliedVolume = (inpAppliedVolume == NULL ? VOLUME_REAL : (ENUM_APPLIED_VOLUME)inpAppliedVolume);
int                  paramBarsToAnalyze = (inpBarsToAnalyze == NULL ? 20 : (int)inpBarsToAnalyze);



//+------------------------------------------------------------------+
//| Custom indicator initialization function                         |
//+------------------------------------------------------------------+
void OnInit() {
    SetIndexBuffer( 0, bufferVolume, INDICATOR_DATA );
    SetIndexBuffer( 1, bufferColors, INDICATOR_COLOR_INDEX );

    IndicatorSetString(INDICATOR_SHORTNAME,"Minions.BetterVolume ("+EnumToString(inpAppliedVolume)+", Period:"+(string)paramBarsToAnalyze+")");
    IndicatorSetInteger(INDICATOR_DIGITS,0);
}



//+------------------------------------------------------------------+
//|  Volume Calculation...                                           |
//+------------------------------------------------------------------+
int OnCalculate(const int rates_total,
                const int prev_calculated,
                const datetime &time[],
                const double &open[],
                const double &high[],
                const double &low[],
                const double &close[],
                const long &tick_volume[],
                const long &volume[],
                const int &spread[])
    {
    int   start=prev_calculated-1;
    long  SMA;

    if (rates_total<2)  {  return(0);  }     // check for rates total

    if (start<1) {  start=1;  }              // correct position

    // calculates the volumes histogram...
    for(int i=start; i<rates_total && !IsStopped(); i++) {

        bufferVolume[i] = (double)(paramAppliedVolume==VOLUME_REAL  ?  volume[i]  :  tick_volume[i]);     // calculates the indicator...

        if(paramAppliedVolume==VOLUME_REAL) {
            SMA = SMAOnArray(volume, paramBarsToAnalyze, i );
        } else {
            SMA = SMAOnArray(tick_volume, paramBarsToAnalyze, i );
        }
        
        // change candle colors accordingly...
        if      (open[i]<close[i] && bufferVolume[i]>SMA) {  bufferColors[i]=1.0;  }
        else if (open[i]>close[i] && bufferVolume[i]>SMA) {  bufferColors[i]=2.0;  }
        else                                              {  bufferColors[i]=0.0;  }
    
    }

    return(rates_total);
  }





//+------------------------------------------------------------------+
//| Calculates a SMA over an indicator array...                      |
//+------------------------------------------------------------------+
long SMAOnArray( const long &array[], int period, int position ) {
    long sum = 0;

    if (position-period <= 0)  {  return false;  }

    for (int i = position-period+1; i<=position; i++) {
        sum += array[i];
    }

    return sum / period;
}
//+------------------------------------------------------------------+
Attachments
"There is NO GOD higher than TRUTH" - Mahatma Gandhi


Re: Any ideas which "Volume" this is?

6
ionone wrote: Mon Jan 17, 2022 1:09 am

NB : in MT4 a Volume bar is red f it is lower than previous bar, that's not what we want, we want the same volume as in TV but I'm not sure of the code.

any help is welcome
thanks

Jeff
This volume indicator has bar colours as per the chart, but doesn't adjust for the HA that you are looking for.
These users thanked the author Ogee for the post (total 2):
ionone, Jedidiah

Re: Any ideas which "Volume" this is?

8
ionone wrote: Mon Jan 17, 2022 1:09 am I stumbled across a strategy yesterday, but it is a TradingView strategy
it uses Heiken Ashi and Volume.

just put the indicator "Volume" on the chart and switch to Heiken Ashi.

if a volume bar is green and above a previous red bar then enter long
if a volume bar is red and above a previous green bar then enter short

it seems pretty powerful, but it has not been made for MT4 and i'm trying to make it in MT4

NB : in MT4 a Volume bar is red f it is lower than previous bar, that's not what we want, we want the same volume as in TV but I'm not sure of the code.

any help is welcome
thanks

examples of trades:
Image

(yes I know HA is not real price blah blah)
Jeff
The thing about volume is like this. Market makers they trade volume not price. Option volume is more powerful than Futures volume Futures volume is more reliable than Spot volume and real volume is more reliable than tick volume. It doesn't matter what kind of volume it is. What matters is whether you know how to trade them. For example, reducing volume at a 50 pullback is abnormal. This is where most technical traders will enter at that 50 pullback or wait for a 75 squeeze. If you don't understand the concept of exhaustion, absorption and stopping volume, why trade volume? Huge spike of volume can mean commercial activity, it can also be absorption while reducing volume may suggest exhaustion or a withdrawal of liquidity.
These users thanked the author lonebladeRGC for the post (total 2):
Woodyz, Garg

Re: Any ideas which "Volume" this is?

9
Chart M 15 in the forex and futures markets in the same time interval. The longer the time periods, the more accurate the representation of the volume price. However, the calculation of the price compared to the Forex market goes ahead.
These users thanked the author dmnik for the post:
SijjiN
Who knows others is wise
Who knows himself is enlightened

Re: Any ideas which "Volume" this is?

10
ionone wrote: Mon Jan 17, 2022 1:09 am I stumbled across a strategy yesterday, but it is a TradingView strategy
it uses Heiken Ashi and Volume.

just put the indicator "Volume" on the chart and switch to Heiken Ashi.

if a volume bar is green and above a previous red bar then enter long
if a volume bar is red and above a previous green bar then enter short

it seems pretty powerful, but it has not been made for MT4 and i'm trying to make it in MT4

NB : in MT4 a Volume bar is red f it is lower than previous bar, that's not what we want, we want the same volume as in TV but I'm not sure of the code.

any help is welcome
thanks

examples of trades:

(yes I know HA is not real price blah blah)
Jeff
can you post the tradingview code? It looks like a simple moving average crossover applied to the volume from first glance.
Know Thy Setup. Know Thyself.


Who is online

Users browsing this forum: BeatlemaniaSA, DotNetDotCom [Bot], Intrest 1, vvFish, Yandex [Bot] and 98 guests