Page 1 of 1

Any ideas which "Volume" this is?

Posted: Mon Jan 17, 2022 1:09 am
by ionone
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?

Posted: Mon Jan 17, 2022 1:23 am
by josi
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?

Posted: Mon Jan 17, 2022 1:27 am
by ionone
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

Re: Any ideas which "Volume" this is?

Posted: Mon Jan 17, 2022 1:57 am
by sal
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;
}
//+------------------------------------------------------------------+

Re: Any ideas which "Volume" this is?

Posted: Mon Jan 17, 2022 2:02 am
by ChuChu Rocket
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.
If it's anything like the Better Volume, we can start by comparing with the latest version of Better Volume Ticks indicator :think:

Re: Any ideas which "Volume" this is?

Posted: Mon Jan 17, 2022 8:57 pm
by Ogee
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.

Re: Any ideas which "Volume" this is?

Posted: Mon Jan 17, 2022 11:37 pm
by ionone
Ogee wrote: Mon Jan 17, 2022 8:57 pm This volume indicator has bar colours as per the chart, but doesn't adjust for the HA that you are looking for.
it is not exactly the same I see higher green bars just before a big bearish move :think: and vice-versa

Re: Any ideas which "Volume" this is?

Posted: Tue Apr 12, 2022 11:14 am
by lonebladeRGC
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.

Re: Any ideas which "Volume" this is?

Posted: Wed Sep 14, 2022 8:54 pm
by dmnik
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.

Re: Any ideas which "Volume" this is?

Posted: Wed Sep 14, 2022 9:19 pm
by shaileshm
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.