Volume Filter Export To File

If you need an Indicator or Signal developed or translated from other language, please post all Indicator development REQUESTS to this section here.

Moderator: admin

Volume Filter Export To File

Postby logicgate » Wed Feb 13, 2019 7:24 pm

Hello dear friend Apprentice, I was developing this idea further in my head, this is what I would like to experiment with.

In order to use the COT Index formula, I need the NET volume info. I can get a surrogate of that using the cumulative delta indicator, but the detrended version right? The regular version keeps summing the data on a running total.

But, first we have to filter the volume using the Pascal Willain Effective volume. We wanna be using the Large Effective Volume (the large players) volume only.

So, here is what I am thinking. We feed the Large Effective Volume into the cumulative delta detrended so it will spit out the NET large volume for each bar. What I am interested in seeing is the NET large volume of the daily bars. Ok, then this data needed to be exported to an excel or .csv file with two columns: one with the date and other with the volume data, so we can do some historical analysis.

What I wanna do with that? I wanna replace the volume data in the EOD futures data with this one, because in the EOD data we have the Open Interest data. So I can divide the NET large volume by the Open Interest column to create the index.

I have no clue if it's gonna work, but I would like to test it...

thanks mate
logicgate
FXCodeBase: Aspirant (Junior)
 
Posts: 680
Joined: Tue Dec 11, 2018 7:54 am

Re: Volume Filter Export To File

Postby Apprentice » Sat Feb 16, 2019 2:35 am

Can you provide a reference for the development team?
User avatar
Apprentice
FXCodeBase: Confirmed User
 
Posts: 36341
Joined: Thu Dec 31, 2009 11:59 am
Location: Zagreb, Croatia

Re: Volume Filter Export To File

Postby logicgate » Sat Feb 16, 2019 7:20 am

Apprentice wrote:Can you provide a reference for the development team?



Sure! What exactly do you mean by reference?
logicgate
FXCodeBase: Aspirant (Junior)
 
Posts: 680
Joined: Tue Dec 11, 2018 7:54 am

Re: Volume Filter Export To File

Postby logicgate » Sat Feb 16, 2019 8:31 am

I mean, you coded the indis needed for this, Pascal Willain Effective Volume is here:

{- Filename: Effective Volume™ -}
{*************************************************
Effective Volume™ is an indicator developed by Pascal Willain and published in the book "Value in Time" , Wiley 2008.
This indicator detects institutional activities by stastistically analysing price/volume movements on the minute level.
This analysis allows to show institutional players' activities out of the noise generated by retail players.
More information can be found on http://www.effectivevolume.eu
Effective Volume is a registered trademark.
Adaptation of Effective Volume™ to "Wall Street" has been provided by Paul Menzing.
**************************************************}
var
Direction,NumBars,DayCount,iVolumeFilter,iPriceFilter,Dag : integer;
i,Counter,Counter1,Counter2,Loop : integer;
TotalDailyVolume,SPI,PriceFiter,Size : real;
PriceInflection,TotalDailyEV,SeperationNumber : real;
VolumeFilter,TotalEffVolume,xMidPoint,Temp,SeparationVolume : real;
PlotSEV,PlotLEV,LargeEffectiveVolume,SmallEffectiveVolume,TrueLow : TSeries;
TrueHigh,CloseAgo,EffectiveVolume,TotalEffectiveVolume,xDayCount : TSeries;
SessionEndTime,xSessionEndTime,StartDate : TdateTime;
ShowMD : Boolean;

aEffectiveVolume : array[1..1440]of Real;
aTmp : array[1..1440]of Real;

begin

iVolumeFilter := CreateParameterInteger('VolumeFilter %', 1, 999,5, true);
iPriceFilter := CreateParameterInteger('PriceFilter %', 1, 999, 1, true);
SPI := CreateParameterReal('Smallest Price Increment', 0, 1, 0.01, false);
Size := CreateParameterReal('Size', 0, 1, 0.001, false);
Dag := CreateParameterInteger ('Total Days' , 1 , 2000 , 15 , true);
ShowMD := CreateParameterBoolean('Multiple days', true, false);

with Indicator do
begin
ShortName := 'Effective Volume™';
RequiredBars := 2*390;
end;

CloseAgo := Shiftseries(Close,1);
TrueLow := MinSeries(Low,CloseAgo);
TrueHigh := MaxSeries(High,CloseAgo);
xDayCount := CreateSeries(BarCount);
EffectiveVolume := CreateSeries(BarCount);
TotalEffectiveVolume := CreateSeries(BarCount);
LargeEffectiveVolume := CreateSeries(BarCount);
SmallEffectiveVolume := CreateSeries(BarCount);
PlotLEV := CreateSeries(BarCount);
PlotSEV := CreateSeries(BarCount);

if Dag <= 5 then Dag := 7 else Dag := Trunc((Dag/5) * 7);
StartDate := date - (Dag + 2);

DayCount := 0;

for i:=FirstValidIndex(close)+1 to barcount-1 do begin

xSessionEndTime := frac(datetime[i])+ 0.001;
SessionEndTime := Instrument.MarketClose;


if dateTime[i] >= (StartDate) then
begin

if (DayCount = 0 ) then
begin
NumBars := 0;
LargeEffectiveVolume[i] := 0;
SmallEffectiveVolume[i] := 0;
PlotLEV[i] := NAN;
PlotSEV[i] := NAN;
end;

TotalDailyVolume := TotalDailyVolume + Volume[i];
PriceFiter := Abs(((Close[i] - Close[i-1])/Close[i-1])*100);

if (DayCount > 0) then
begin
NumBars := NumBars + 1;
if Numbars = 1 then EffectiveVolume[i] := 0;

if (Numbars > 1) then begin
if (Close[i-1] - Close[i] <> 0) and ( (Volume[i] <= VolumeFilter) and (PriceFiter <= iPriceFilter))then
begin

if close[i] > close[i-1] then
begin
PriceInflection := close[i] - close[i-1];
Direction := 1;
end;
if close[i] < close[i-1] then
begin
PriceInflection := close[i-1] - close[i];
Direction := -1;
end;

if (TrueHigh[i] - TrueLow[i] + SPI) <> 0 then EffectiveVolume[i] := Direction * ((PriceInflection + SPI)/(TrueHigh[i] - TrueLow[i] + SPI)) * Volume[i] else EffectiveVolume[i] := 0;
end
else EffectiveVolume[i] := 0;
end;//Numbars

TotalEffVolume := TotalEffVolume + EffectiveVolume[i];
aEffectiveVolume[NumBars] := EffectiveVolume[i];
aTmp[NumBars] := Abs(EffectiveVolume[i]);
TotalDailyEV := TotalDailyEV + aTmp[NumBars];
end;//Daycount
/////////////////////////////////End Of Day Calculation/////////////////////////////////////////////////////
if xSessionEndTime >= SessionEndTime then begin
DayCount := DayCount + 1;
xMidPoint := TotalDailyEV * 0.5;

if (DayCount > 0) and (Numbars > 2) then
begin

//Sorting Array High to Low
for Counter1 := 1 to Numbars-1 do
begin
for Counter2 := Counter1 + 1 to Numbars do
begin
if aTmp[Counter1] < aTmp[Counter2]then
begin
Temp := atmp[Counter1];
aTmp[Counter1] := aTmp[Counter2];
aTmp[Counter2] := Temp;
end ;
end ;
end ;

Loop := 1;
SeperationNumber := TotalDailyEV;
while (loop <= NumBars) and (SeperationNumber >= xMidPoint)do
begin
SeperationNumber := SeperationNumber - aTmp[Loop];
SeparationVolume := aTmp[Loop];
Loop := Loop + 1;
end;

for Counter := Numbars - 1 downto 0 do
begin

if abs(aEffectiveVolume[Numbars - Counter])>= SeparationVolume
then begin
LargeEffectiveVolume[i - Counter]:=LargeEffectiveVolume[i - Counter-1] + aEffectiveVolume[Numbars - Counter]*Size;
SmallEffectiveVolume[i - Counter]:=SmallEffectiveVolume[i - Counter-1]+ 0;
end
else
if abs(aEffectiveVolume[Numbars - Counter])< SeparationVolume then
begin
SmallEffectiveVolume[i - Counter]:=SmallEffectiveVolume[i - Counter-1] + aEffectiveVolume[Numbars - Counter]*Size;
LargeEffectiveVolume[i - Counter]:=LargeEffectiveVolume[i - Counter-1]+ 0;
end;
//Plot values starting with first minute
if (DayCount > 1) then begin
PlotLEV[i - Counter] := round(LargeEffectiveVolume[i - Counter]);
PlotSEV[i - Counter] := round(SmallEffectiveVolume[i - Counter]);
end;
end;

for Counter := 1 to Numbars do
begin
aEffectiveVolume[Numbars] := 0;
aTmp[Numbars] := 0;
end;
end;//NumBars

NumBars := 0;
VolumeFilter := TotalDailyVolume * (iVolumeFilter * 0.01);
TotalDailyEV := 0;
TotalDailyVolume := 0
TotalEffVolume := 0;
EffectiveVolume[i] := 0;
TotalEffectiveVolume[i]:= 0;
if not ShowMD then
begin
LargeEffectiveVolume[i] := 0;
SmallEffectiveVolume[i] := 0;
end;
end; //SessionEndTime
end; // StartDate
end; //for

with CreateLine(PlotLEV) do
begin
Name := 'LEV';
Color := clBlue;
width := 4;
end;
with CreateLine(PlotSEV) do
begin
Name := 'SEV';
Color := clYellow;
width := 4;
end;
end.



You take the LEV (Large Effective Volume) output and input to Cumulative Delta Detrended:

viewtopic.php?f=38&t=67166


So, If I am correct you gonna have the Large Players NET volume after this process. You just need to make then indicator then output this info to an excel or .csv file.

So:

Pascal Willain Effective Volume (LEV output only) >>>> Cumulative Delta Detrended (which is not cumulative anymore)>>> Excel or .csv file
logicgate
FXCodeBase: Aspirant (Junior)
 
Posts: 680
Joined: Tue Dec 11, 2018 7:54 am

Re: Volume Filter Export To File

Postby logicgate » Sat Feb 16, 2019 6:19 pm

If it does not work in this order, it could be the case of the detrended delta coming first, then:

Cumulative Delta Detrended (which is not cumulative anymore)>>> Pascal Willain Effective Volume (LEV output only)>>>>>Excel or .csv file
logicgate
FXCodeBase: Aspirant (Junior)
 
Posts: 680
Joined: Tue Dec 11, 2018 7:54 am

Re: Volume Filter Export To File

Postby Apprentice » Sun Feb 17, 2019 6:49 am

Your request is added to the development list under Id Number 4483
User avatar
Apprentice
FXCodeBase: Confirmed User
 
Posts: 36341
Joined: Thu Dec 31, 2009 11:59 am
Location: Zagreb, Croatia

Re: Volume Filter Export To File

Postby Apprentice » Tue Feb 19, 2019 7:15 am

Something like this?
Volume Filter.mq4
(3.41 KiB) Downloaded 388 times
User avatar
Apprentice
FXCodeBase: Confirmed User
 
Posts: 36341
Joined: Thu Dec 31, 2009 11:59 am
Location: Zagreb, Croatia

Re: Volume Filter Export To File

Postby logicgate » Sat Feb 23, 2019 4:48 pm

Sorry brother I can't test it as of now, I am travelling and won't be home at my trading computer in the next 2 weeks. :(
logicgate
FXCodeBase: Aspirant (Junior)
 
Posts: 680
Joined: Tue Dec 11, 2018 7:54 am


Return to Indicator and Signal Requests

Who is online

Users browsing this forum: Google [Bot] and 14 guests