NO LINKS OR MQL SOURCE CODE REQUESTS. Please follow the rules.

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:
screenshot.143.jpg
(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

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;
}
//+------------------------------------------------------------------+
Screenshot_3.jpg


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.
AllVolumeAverage_v2 600+.mq4
(51.72 KiB) Downloaded 120 times

Re: Any ideas which "Volume" this is?

#7
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?

#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.


Attachments 3
  1. Similar Topics

    1. Support Resistance strategy & Ideas

      19 Replies 7822 Views

      by sal, Sun Jul 18, 2021 10:29 pm in Trading Systems

      19 Replies
      7822 Views
    2. Any interesting movies to watch or stream online?

      121 Replies 9112 Views

      by dalemcintosh, Fri May 21, 2021 7:16 pm in Trader's Lounge

      121 Replies
      9112 Views
    3. Any one used trend imperator v3 yet

      0 Replies 1270 Views

      by tradersanbrokers, Sat Aug 14, 2021 5:25 am in MT4 Indicators

      0 Replies
      1270 Views

Return to “MT4 Indicators”

Users viewing this forum: alpha24, bilbao, Borshchov A.N., cheburashka, choukrad90, ChrisTinus, CommonCrawl [Bot], Davidp26, Deez, juanffs, keys898, mladi.indiana, SEMrush [Bot], SijjiN, Tornado21, Yandex [Bot], zeleogue58 and 85 guests