EasyLanguage Treasure Chest

Status
Not open for further replies.
Tick Money Flow (TMF)

(This indicator only works during market hour)

<img src=http://www.elitetrader.com/vb/attachment.php?s=&postid=1678147 width=800>
click on image to enlarge

421

more chart examples:
http://www.elitetrader.com/vb/attachment.php?s=&postid=1679800
http://www.elitetrader.com/vb/attachment.php?s=&postid=1678133


click here to download the code (ELD format):
http://www.elitetrader.com/vb/attachment.php?s=&postid=1678180
147


Code:
[color=blue]
Inputs: 
Length1(500),
Length2(100), 
upcolorPlus(blue), 
dncolorPlus(red), 
upcolorMinus(yellow), 
dncolorMinus(darkbrown), 
colorbar(1); 

Vars:	
IntrabarPersist TickFlag(0), 
IntrabarPersist OldPrice(0), 
IntrabarPersist TMF(0), 
IntrabarPersist NewTickVol(0), 
IntrabarPersist MyBarVolume(0); 
 
if BarNumber >= 1 then 
begin 
	NewTickVol = Ticks - MyBarVolume; 
	MyBarVolume = MyBarVolume + NewTickVol; 
	
	if (C>=CurrentAsk) then 
	begin
		TMF=TMF + (C * NewTickVol); 
		TickFlag = 1; 
	end;
	 
	if (C<=CurrentBid) then 
	begin 
		TMF=TMF - (C * NewTickVol); 
		TickFlag = 2; 
	end; 
	
	if (C<CurrentAsk and C>CurrentBid) and C>OldPrice 
	then TMF=TMF + (C*NewTickVol); 
	if (C<CurrentAsk and C>CurrentBid) and C<OldPrice 
	then TMF=TMF - (C*NewTickVol); 
	if (C<CurrentAsk and C>CurrentBid) and C=OldPrice and TickFlag = 1 
	then TMF=TMF + (C*NewTickVol); 
	if (C<CurrentAsk and C>CurrentBid) and C=OldPrice and TickFlag = 2 
	then TMF=TMF - (C*NewTickVol); 
	
	OldPrice = C; 
	
	if BarStatus(1) = 2 then MyBarVolume = 0; 
end; 

Plot1(TMF, "TMF");
Plot2(0, "Zero");

if (TMF > TMF[1]) then
begin
	if (TMF >=0) then
		SetPlotColor[colorbar](1, upcolorPlus)
	else
		SetPlotColor[colorbar](1, upcolorMinus);
end
else if (TMF < TMF[1]) then
begin
	if (TMF >=0) then
		SetPlotColor[colorbar](1, dncolorPlus)
	else
		SetPlotColor[colorbar](1, dncolorMinus);
end;

Plot2(LinearRegValue(Plot1,Length1,0)); 
Plot3(LinearRegValue(Plot1,Length2,0)); 
[/color]
 
Quote from Tums:
Do you mean it like this?


Hi Tums,
Yes, thank you. How do I get it at the bottom of the chart as you have it? Mine shows up in the middle of the pane not the bottom? Thank you.

Tim
 
Quote from raven4ns:
Hi Tums,
Yes, thank you. How do I get it at the bottom of the chart as you have it? Mine shows up in the middle of the pane not the bottom? Thank you.
Tim

Go to Format> Study> Scaling

under Scale Range, select User Defined:
set Maximum to 50, Minimum to -1
 
Quote from Tums:

Go to Format> Study> Scaling

under Scale Range, select User Defined:
set Maximum to 50, Minimum to -1

Tum,
Thank you very much for your help. I have the indicator I wanted almost complete. It is an indicator that I use in Amibroker and is quite good. The only thing left to do is try and match the scale of the TSI and CCI so the zero lines are the same. Once again, thank you very much.

Tim
 
Quote from raven4ns:
Tum, Thank you very much for your help. I have the indicator I wanted almost complete. It is an indicator that I use in Amibroker and is quite good. The only thing left to do is try and match the scale of the TSI and CCI so the zero lines are the same. Once again, thank you very much. Tim

see if this would work...
you can adjust the TSI.Multiplier to make the TSI more visible.

// a zero line is also added
// if you don't want to see any of the OB/OS/zero lines, simply set them to invisible.


<img src=http://www.elitetrader.com/vb/attachment.php?s=&postid=2285478>


p.s. You need to add the TSI function to your computer.
you can get the code here:
http://www.elitetrader.com/vb/showthread.php?s=&postid=2284287#post2284287



right click on attachment link to download the code:
 

Attachments

Quote from Tums:

see if this would work...
you can adjust the TSI.Multiplier to make the TSI more visible.

Hi Tum,
It shows an error in the plot4 line and hilights the TSI.

Tim
 
Candle Patterns


This program prints the candle pattern name on the bottom of the chart.

<img src=http://www.elitetrader.com/vb/attachment.php?s=&postid=2285759>
 

Attachments

Status
Not open for further replies.
Back
Top