Ticks Separate Volume and TheTick

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

Ticks Separate Volume and TheTick

Postby Laurus12 » Wed Apr 07, 2010 7:55 am

Hi. I read the new post "Pivot signal" by LordTwig where he mentions "how many Buys and How many Sells have occurred in timeframes" and I have found the TicksSeparateVolume which shows how many up and down ticks for every candle in a chosen time frame with green (buyers) and red (sellers) bars and a numbers display. I addition I repost the TheTick oscillator which shows the result or weight of each volume in relations to a zero line. I think both indicators together gives a very good picture and perspective of what is going on.

The TicksSeparateVolume confirms that the TheTick is exactly the kind of tick oscillator I have been looking for. The thing I do not like about the MT4 version of TheTick is that because of the auto scale function of MT4 the lower volume lines sometimes gets too truncated when higher volume lines appears. Maybe this would be better in a Marketscope version.

If you guys could make both these indicators, that would be great. I have added the MT4 formulas for both and two pictures below for different time frames which shows how the two indicators looks like and confirms each other.

Thanks,
Laurus12
*******************************************************************************
TicksSeparateVolume:
**************************
#property indicator_separate_window
#property indicator_buffers 2
#property indicator_minimum 0

#property indicator_color1 SeaGreen
#property indicator_color2 Crimson

double UpTicks[];
double DownTicks[];

//+------------------------------------------------------------------+
//| Custom indicator initialization function |
//+------------------------------------------------------------------+
int init()
{
IndicatorShortName("TicksSeparateVolume("+Symbol()+")");

SetIndexBuffer(0,UpTicks);
SetIndexBuffer(1,DownTicks);

SetIndexStyle(0,DRAW_HISTOGRAM,0,3);
SetIndexStyle(1,DRAW_HISTOGRAM,0,2);

SetIndexLabel(0,"UpTicks");
SetIndexLabel(1,"DownTicks");

return(0);
}
//+------------------------------------------------------------------+
//| Custom indicator deinitialization function |
//+------------------------------------------------------------------+
int deinit()
{

ObjectDelete("UpTicks1");
ObjectDelete("DownTicks1");
ObjectDelete("UpTicks2");
ObjectDelete("DownTicks2");

Comment("");

return(0);
}
//+------------------------------------------------------------------+
//| Ticks Volume Indicator |
//+------------------------------------------------------------------+
int start()
{

ObjectDelete("UpTicks1");
ObjectDelete("DownTicks1");
ObjectDelete("UpTicks2");
ObjectDelete("DownTicks2");

int i,counted_bars=IndicatorCounted();
//---- check for possible errors
if(counted_bars<0) return(-1);
//---- last counted bar will be recounted
if(counted_bars>0) counted_bars--;
int limit=Bars-counted_bars;


//----
for(i=0; i<limit; i++)
{
UpTicks[i]=(Volume[i]+(Close[i]-Open[i])/Point)/2;
DownTicks[i]=Volume[i]-UpTicks[i];
}

string BV="BUYERS (GREEN VOLUME): "+DoubleToStr(UpTicks[0],0)+"";
string SV="SELLERS (RED VOLUME): "+DoubleToStr(DownTicks[0],0)+"";


ObjectCreate("UpTicks2", OBJ_LABEL, WindowFind("TicksSeparateVolume("+Symbol()+")"), 0, 0);
ObjectSetText("UpTicks2",StringSubstr((BV),0), 10, "Tahoma" ,Black);
ObjectSet("UpTicks2", OBJPROP_CORNER, 0);
ObjectSet("UpTicks2", OBJPROP_XDISTANCE, 6);
ObjectSet("UpTicks2", OBJPROP_YDISTANCE, 22);

ObjectCreate("DownTicks2", OBJ_LABEL, WindowFind("TicksSeparateVolume("+Symbol()+")"), 0, 0);
ObjectSetText("DownTicks2",StringSubstr((SV),0), 10, "Tahoma" ,Black);
ObjectSet("DownTicks2", OBJPROP_CORNER, 0);
ObjectSet("DownTicks2", OBJPROP_XDISTANCE, 6);
ObjectSet("DownTicks2", OBJPROP_YDISTANCE, 42);

//----
return(0);
}
//+------------------------------------------------------------------+

*******************************************************************************
TheTick:
**********
#property indicator_separate_window
#property indicator_buffers 1
#property indicator_color1 Blue

double TheTick[];

//+------------------------------------------------------------------+
//| Custom indicator initialization function |
//+------------------------------------------------------------------+
int init()
{
//---- indicators
SetIndexStyle(0,DRAW_LINE);
SetIndexBuffer(0,TheTick);
SetIndexDrawBegin(0,5);

SetLevelStyle(1,1,Black);
SetLevelValue(0, 0.0);
//----
return(0);
}
//+------------------------------------------------------------------+
//| Custom indicator deinitialization function |
//+------------------------------------------------------------------+
int deinit()
{
//----

//----
return(0);
}
//+------------------------------------------------------------------+
//| Custom indicator iteration function |
//+------------------------------------------------------------------+
int start()
{
//---- Loop Prep
int Limit; int Count; int PrevDay;
int counted_bars=IndicatorCounted();
if(counted_bars<0) return(-1); // Check for error
if(counted_bars>0) counted_bars--; // Last counted bar will be recounted
Limit = Bars-counted_bars;

double Multiplier = 0;

if( StringFind( Symbol(), "JPY", 0) != -1 )
{
Multiplier = 0.1;
}
else
{
Multiplier = 100.0;
}
for( int i = 0; i < Limit; i++ )
{
TheTick[i] = ( ( Close[i] - Open[i] ) * Volume[i] ) * Multiplier ;
}

//----
return(0);
}
//+------------------------------------------------------------------+
Attachments
Separate Volume_TheTick_EURJPY_H1.png
Separate Volume_TheTick_AUDUSD_M1.png
Laurus12
FXCodeBase: Confirmed User
 
Posts: 45
Joined: Tue Jan 26, 2010 6:49 pm
Location: Norway

Re: Ticks Separate Volume and TheTick

Postby gg_frx » Thu Apr 08, 2010 6:18 am

+1
another indicator that i use too ;)
gg_frx
FXCodeBase: Confirmed User
 
Posts: 38
Joined: Thu Dec 17, 2009 8:42 am

Re: Ticks Separate Volume and TheTick

Postby Nikolay.Gekht » Thu Apr 08, 2010 9:00 am

As for many other indicators, it requires the volume. Today I'll try to discuss with FXCM a chance that the volume can be published again...
Nikolay.Gekht
FXCodeBase: Site Admin
 
Posts: 1235
Joined: Wed Dec 16, 2009 6:39 pm
Location: Cary, NC

Re: Ticks Separate Volume and TheTick

Postby LordTwig » Thu Apr 08, 2010 10:40 am

Yeah, good luck with that Nikolay.
For some unknown reason FXCM just don't want traders knowing or using Volume!!!
Your guess is as good as mine.
Why can't Traders get volume, is the Question you need to ask.

Regards
LordTwig
Cheers
LordTwig
LordTwig
FXCodeBase: Confirmed User
 
Posts: 157
Joined: Fri Mar 12, 2010 3:15 am

Re: Ticks Separate Volume and TheTick

Postby Laurus12 » Thu Apr 08, 2010 11:52 am

For a little while ago I did some reading on "volume" trading with MT4 in a dedicated thread on Forex-TSD. They explained that the term or coding definition "Volume" with MT4 is acctually just amount of down and up going ticks and therefore misguiding. Based on this I think that none of these two indicators are acctually real volume indicators, but dependent on the same kind of tick feed which we can see in Marketscopes Tick chart. So I think we got what we need. Since I am not a coder I am carefully guessing that "Volume" in the mql code is the same as lua's "core.tick".

Thanks,
Laurus12 :)
Laurus12
FXCodeBase: Confirmed User
 
Posts: 45
Joined: Tue Jan 26, 2010 6:49 pm
Location: Norway

Re: Ticks Separate Volume and TheTick

Postby gg_frx » Thu Apr 08, 2010 4:44 pm

i am with you laurus12,
no needs "real" volume, tick count is what we need and the indicator posted above is coded with this concept in mind
here a link to another thread by apprentice , an indicator based on tick volume
viewtopic.php?f=28&t=558

( i don't think that at fxcm are so happy to show their "real" volumes ... at least not to retail traders :twisted: )
gg_frx
FXCodeBase: Confirmed User
 
Posts: 38
Joined: Thu Dec 17, 2009 8:42 am

Re: Ticks Separate Volume and TheTick

Postby Laurus12 » Thu Apr 08, 2010 6:21 pm

Thank you gg_frx! I have overlooked Apprentice's posting of the Tick Volume. I am going to follow his work closely. And thank you for posting those volume-links. A very interesting topic :)

Regarding real volume I believe we have FXCM Active Trader.
Laurus12
FXCodeBase: Confirmed User
 
Posts: 45
Joined: Tue Jan 26, 2010 6:49 pm
Location: Norway


Return to Indicator and Signal Requests

Who is online

Users browsing this forum: No registered users and 9 guests