Jump to content

Welcome to the new Traders Laboratory! Please bear with us as we finish the migration over the next few days. If you find any issues, want to leave feedback, get in touch with us, or offer suggestions please post to the Support forum here.

  • Welcome Guests

    Welcome. You are currently viewing the forum as a guest which does not give you access to all the great features at Traders Laboratory such as interacting with members, access to all forums, downloading attachments, and eligibility to win free giveaways. Registration is fast, simple and absolutely free. Create a FREE Traders Laboratory account here.

wsam29

TTM/DDF Value Chart

Recommended Posts

In order to convert an indicator to a showme in TS you would usually copy and paste the original (eg. the VC above) code into a new showme code. Then replace the plot statements as followed

1. comment out the OHLC plots 1-4; you don't need them.

2. Replace plot5 and plot6 with the appropriate values.

 

Basically what you are doing is adjusting the plotting to the same scale as the underlying instrument.

 

{
If BarNumber > Numbars then Begin
Plot1(VOpen,"VOpen");
Plot2(VHigh,"VHigh");
Plot3(VLow,"VLow");
Plot4(VClose,"VClose");
End;
}

If VHigh > Highest(VHigh,TwentyNumBars)[1] Then Begin
Plot5( H + MinMove / PriceScale , {VHigh} "21BarVHigh");
Alert;
end	
else
NoPlot (5);

IF VLow < Lowest(VLow,TwentyNumBars)[1] Then Begin
Plot6( L - MinMove / PriceScale,  {VLow} "21BarVLow");
Alert;
end
else
NoPlot (6);

Share this post


Link to post
Share on other sites

its look great on the pic its what i am looking for but i have hard time to convert the code to Show-me its give me error message

 

Can you add ELD to down load or post the code for show-me

 

thanks

Edited by sean
or add the code

Share this post


Link to post
Share on other sites

Here is the code thanks for all the help

 

 

[LegacyColorValue = true];

 

{*******************************************************************

Description : This Indicator plots Value Chart prices.

Provided By : Mark W. Helweg © Copyright 2001

********************************************************************}

 

Inputs:NumBars(5);

Variables:Vopen(0),VHigh(0),VLow(0),VClose(0),Var1(0),Var2(0);

Var: VcloseLam(0),ValueSOB(" "),ValueMOB(" "),ValueMOS(" "), ValueSOS(" "), ValueFair(" "), lastdate(0);

 

 

{Calcualte Value Chart}

VOpen = VChart(NumBars,Open);

VHigh = VChart(NumBars,High);

VLow = VChart(NumBars,Low);

VClose = VChart(NumBars,Close);

 

{Plot Value Chart - Disregards the first 20 bars because Omega doesn't process them correctly}

If BarNumber > Numbars then Begin

 

End;

 

If VHigh > 8 Then Begin

Plot5( H + MinMove / PriceScale , {VHigh} "21BarVHigh");

Alert;

end

else

NoPlot (5);

 

if VLow <-8 Then Begin

Plot6( L - MinMove / PriceScale, {VLow} "21BarVLow");

Alert;

end

else

NoPlot (6);

 

 

if VHigh > 8 then Alert("ValueChart +8");

if VLow <-8 then Alert("ValueChart -8");

 

This set-up work 9 out of 10 time for reversal or end of the trend on 2 minuets chart with VC setting is (+7 and -7) with extreme volume

 

sean

Share this post


Link to post
Share on other sites

Hi Guys. I have the code for the value chart indicator in TS but can not get it to plot as candlesticks, only bars, line, points etc. Is there any reason for this, that I a humble non-programmer doesn't realise?

 

many thanks

Share this post


Link to post
Share on other sites
Guest forsearch

That's the way TS is setup for an indicator. No candlesticks, just bars, line, points, etc.

Share this post


Link to post
Share on other sites
Hi Guys. I have the code for the value chart indicator in TS but can not get it to plot as candlesticks, only bars, line, points etc. Is there any reason for this, that I a humble non-programmer doesn't realise?

many thanks

The original VC was implemented as OHLC (Open, high, low, close) by Helweg and Stendahl and there is nothing wrong with it, but...

 

VCFIG1.jpg

 

you could easily program EL to display synthetic candlesticks

attachment.php?attachmentid=7402&stc=1&d=1217279310

 

Attached please find VC candles. If you don't get what is shown, try re-formatting the 'style' and 'Weight' of VClose, VOpen, High and Low. You can further program the wick color and candle body properties to suit, beyond what is shown.

Share this post


Link to post
Share on other sites
Guest forsearch
The original VC was implemented as OHLC (Open, high, low, close) by Helweg and Stendahl and there is nothing wrong with it, but...

 

VCFIG1.jpg

 

you could easily program EL to display synthetic candlesticks

attachment.php?attachmentid=7402&stc=1&d=1217279310

 

Attached please find VC candles. If you don't get what is shown, try re-formatting the 'style' and 'Weight' of VClose, VOpen, High and Low. You can further program the wick color and candle body properties to suit, beyond what is shown.

 

Very nice, thrunner. Could you post the code in plaintext for non -TS users to study?

 

thxs

Share this post


Link to post
Share on other sites

Sure, Forsearch. It is a very simple modification of the original. Just be sure to modify the style and weight of VOpen, VClose, VHigh, VLow, if one is starting from scratch from EL code :

 

[LegacyColorValue = true]; 
// modified for Candlestick
{*******************************************************************
Description	:	This Indicator plots Value Chart prices. 
Provided By	: Mark W. Helweg (c) Copyright 2001
********************************************************************}

Inputs:NumBars(5), TwentyNumBars(20);
Variables:Vopen(0),VHigh(0),VLow(0),VClose(0),Var1(0),Var2(0);
Var: VcloseLam(0),ValueSOB(" "),ValueMOB(" "),ValueMOS(" "), ValueSOS(" "), ValueFair(" "), lastdate(0);


{Calcualte Value Chart}
VOpen = VChart(NumBars,Open);
VHigh = VChart(NumBars,High);
VLow = VChart(NumBars,Low);
VClose = VChart(NumBars,Close);

{Plot Value Chart - Disregards the first 20 bars because Omega doesn't process them correctly}
If BarNumber > Numbars then Begin
if VClose >= VOpen then 
    begin 
    Plot1( VClose,"VClose", Green) ;  
    Plot2( VOpen, "VOpen", Green) ;
	 Plot3( VHigh, "VHigh", Green) ; 
    Plot4( VLow, "VLow", Green) ; 
    end 
else 
    begin 
    Plot1( VClose, "VClose", Red) ;  
    Plot2( VOpen, "VOpen", Red) ; 
	 Plot3( VHigh, "VHigh", Red) ; 
    Plot4( VLow, "VLow", Red) ; 
    end ; 



End;


If VHigh > Highest(VHigh,TwentyNumBars)[1] Then Begin
Plot5(VHigh, "21BarVHigh");

End;

IF VLow < Lowest(VLow,TwentyNumBars)[1] Then Begin
Plot6(VLow, "21BarVLow");

End;

 

VChart function:

[LegacyColorValue = true]; 

{*******************************************************************
Description	:	This Function returns Value Chart prices. 
Provided By	: Mark W. Helweg (c) Copyright 2001
********************************************************************}
Inputs:NumBars(Numeric),Price(NumericSeries);

Variables:VarNumBars(0),Var0(0),LRange(0),YDiv(0),RanVar4(0),VOpen(0),VHigh(0),VLow(0),VClose(0),
VarA(0),VarB(0),VarC(0),VarD(0),VarE(0),VarP(0),VarR1(0),VarR2(0),VarR3(0),VarR4(0),VarR5(0);

{Insure NumBars is between 2 and 1000}
If NumBars < 2 then VarNumBars = 2;
If Numbars > 1000 then VarNumBars = 1000;
If Numbars >= 2 and NumBars <=1000 then VarNumBars = NumBars;

VarP=Round(VarNumBars/5,0);

If VarNumBars >7 then begin
VarA=Highest(H,VarP)-Lowest(L,VarP);
If VarA = 0 and VarP=1 then VarR1=absvalue(C-C[VarP]) Else VarR1 = VarA;
VarB=Highest(H,VarP)[VarP+1]-Lowest(L,VarP)[VarP];
If VarB = 0 and VarP=1 then VarR2=absvalue(C[VarP]-C[VarP*2]) Else VarR2 = VarB;
VarC=Highest(H,VarP)[VarP*2]-Lowest(L,VarP)[VarP*2];
If VarC = 0 and VarP=1 then VarR3=absvalue(C[VarP*2]-C[VarP*3]) Else VarR3 = VarC;
VarD=Highest(H,VarP)[VarP*3]-Lowest(L,VarP)[VarP*3];
If VarD = 0 and VarP=1 then VarR4=absvalue(C[VarP*3]-C[VarP*4]) Else VarR4 = VarD;
VarE=Highest(H,VarP)[VarP*4]-Lowest(L,VarP)[VarP*4];
If VarE = 0 and VarP=1 then VarR5=absvalue(C[VarP*4]-C[VarP*5]) Else VarR5 = VarE;
LRange=((VarR1+VarR2+VarR3+VarR4+VarR5)/5)*.2;
End;


If VarNumBars <=7 then Begin
If AbsValue(C-C[1]) > (H-L) then Var0=AbsValue(C-C[1]) else var0=(H-L);	
If H=L then Var0=absvalue(C-C[1]);
LRange=Average(Var0,5)*.2;
End;

If LRange > 0 then begin
If Price = Open then
VChart=((Open-Average((H+L)/2,VarNumBars)))/(LRange);
If Price = High then
VChart=((High-Average((H+L)/2,VarNumBars)))/(LRange);
If Price = Low then 
VChart=((Low-Average((H+L)/2,VarNumBars)))/(LRange);
If Price = Close then
VChart=((Close-Average((H+L)/2,VarNumBars)))/(LRange);
End;

Edited by thrunner

Share this post


Link to post
Share on other sites

Top work fellas. Number of responses from TS forum, zero, Traderslab, plenty.. Hurrah!! Had a fiddle with the code to the best of my ability, taking it on from Blu-Ray's enhancement to give a green bar on a close above +4 and a red one on a close below -4. Slight glitch in the code in that I can't get all parts of the bar to change colour, I have to leave the close element in the neutral colour otherwise I can't get it to work. Minor glitch that maybe someone can resolve.. Thanks again for the code for the candles, but after trying to work with them I have found this colour coded version of the bars easier to read..

VALUE CHART V3.ELD

Share this post


Link to post
Share on other sites

Hi, this is my first post here. So hello to everyone! Great forum!

 

I'm trying to convert the ValueCharts into MetaTrader 4 and need please some help. I have managed to create the charts but sometimes i get strange results and i know i miss very small piece. :confused:

 

Can someone give some light what value exactly will return the VChart function if LRange is = 0. I know it will skip those lines form the code because of the if statement:

 

If LRange > 0 then begin If Price = Open then VChart=((Open-Average((H+L)/2,VarNumBars)))/(LRange); If Price = High then VChart=((High-Average((H+L)/2,VarNumBars)))/(LRange); If Price = Low then VChart=((Low-Average((H+L)/2,VarNumBars)))/(LRange); If Price = Close then VChart=((Close-Average((H+L)/2,VarNumBars)))/(LRange); End;

 

BUT what will be the input then for the Plot function in this case for the close price and same for H,L,O?? Do we exit with 0?If Plot sees 0 what it does then?

 

Plot1( VClose, "VClose", Red) ;

 

Sorry to asking but i do not know EL and use my C++ and MQL skills to convert the code:crap: So in C++ one have to define what value a function will return. Here because of the IF in the VChart function the case when LRange=0 is undefined.

 

My second qustion is:

What may be the reason that i'm getting values for VChart greater then 15??Some bars (see screenshot) are 100 or more of value. Why can this occur?

 

Thanks in advice!

VC.thumb.jpg.9020ff5bb0a2a294c0a22349b933a05e.jpg

Share this post


Link to post
Share on other sites

 

Are there any special settings to get these to work (the ones available for free fromt he tradethemarket.com site)?

 

I have installed the ELD and also the workspaces per instructions.

 

The TTM DDF Value Chart never appears (although you can see it is inserted into the chart window), and the TTM DDF Automatic does draw the line over the first hour (when the hour is complete), but no red or blue line is extended out from that to show the daily direction.

 

Any help is appreciated.

Share this post


Link to post
Share on other sites

Hi all

 

Thanks very much for everyone in writing this great indicator. I esp like pwald9 version, because the color changes if it reaches +8 or -4.

 

The only thing with that one is ... the color changes are hardcoded i.e. if I change the Top and TopMid the colours dont change (it has been hardcoded for for 4)? Dont know if that makes sense?

 

Can someone please help out in changing the code so that the Top and MidTop change color depending on what I enter?

 

Hope this is OK?

Share this post


Link to post
Share on other sites

Hey, just found this thread from a link over at SierraChart forums. Has anyone been using this indicator successfully? Do you think it's a useful addition or is it one of those "omg this is the holy grail... j/k it's mostly just hype" like the Squeeze?

Share this post


Link to post
Share on other sites
Hey, just found this thread from a link over at SierraChart forums. Has anyone been using this indicator successfully? Do you think it's a useful addition or is it one of those "omg this is the holy grail... j/k it's mostly just hype" like the Squeeze?

 

For any indicator there will be people swearing by it and people saying it is junk. Asking if this is a useful addition, is like asking if a jetski is useful without knowing if you are living in the middle of the desert, or next to a lake. With other words, how useful it is is entirely dependent on the way you are trading and no one can answer that for you. You will just have to look for yourself if this is useful for you.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Topics

  • Posts

    • AMD Advanced Micro Devices stock watch, at 138.35 triple+ support area with bullish indicators at https://stockconsultant.com/?AMD
    • ACAD Acadia Pharmaceuticals stock watch, pull back to 16.15 triple+ support area with bullish indicators at https://stockconsultant.com/?ACAD
    • WGS GeneDx stock, nice rally off the 70.67 support area, watch for upcoming breakout at https://stockconsultant.com/?WGS
    • Date: 25th November 2024. New Secretary Cheers Markets; Trump Trade Eased. Asia & European Sessions:   Equities and Treasuries rise, as markets view Donald Trump’s choice of Scott Bessent for Treasury Secretary as a stabilizing decision for the US economy and markets. Bessent: Head of macro hedge fund Key Square Group, supports Trump’s tax and tariff policies but gradually. He is expected to focus on economic and market stability rather than political gains. His nomination alleviates concerns over protectionist policies that could escalate inflation, trade tensions, and market volatility. Asian stocks rose, driven by gains in Japan, South Korea, and Australia. Chinese equities fail to follow regional trends, presenting investors’ continued disappointment by the lack of strong fiscal measures to boost the economy. The PBOC keeps policy loan rates unchanged after the September cut. US futures also see slight increases. 10-year Treasury yields fall by 5 basis points to 4.35%. Nvidia dropped 3.2%, affected by its high valuation and influence on broader market trends. Intuit fell 5.7% after a disappointing earnings forecast. Meta Platforms declined 0.7% following the Supreme Court’s decision to allow a class action lawsuit over the Cambridge Analytica scandal. Key events this week: Japan’s CPI, as the BOJ signals a possible policy change at December’s meeting. RBNZ expected to cut its key rate on Wednesday. CPI & GDP from Europe will be released. Traders will focus on the Fed’s November meeting minutes, along with consumer confidence and personal consumption expenditure data, to assess potential rate cuts next year. Financial Markets Performance: The US Dollar declines as US Treasuries climb. Bitcoin recovers from a weekend drop, hovering around 98,000, having more than doubled in value this year. Analysts suggest consolidation around the 100,000 level before any potential breakthrough. EURUSD recovers slightly to 1.0463 from 1.0320 lows. Oil prices drop after the largest weekly increase in nearly two months, with ongoing geopolitical risks in Ukraine and the Middle East. UKOIL fell below $75 a barrel, while USOILis at $70.35. Iran announced plans to boost its nuclear fuel-making capacity after being censured by the UN, increasing the potential for sanctions under Trump’s administration. Israel’s ambassador to the US indicated a potential cease-fire deal with Hezbollah, which could ease concerns about Middle Eastern oil production, a region supplying about a third of the world’s oil. Russia’s war in Ukraine escalated with longer-range missile use, raising concerns about potential disruptions to crude flows. Citigroup and JPMorgan predict that OPEC may delay a planned increase in production for the third time during their meeting this weekend. Gold falls to $2667.45 after its largest rise in 20 months last week.Swaps traders see a less-than-even chance the central bank will cut rates next month. Higher borrowing costs tend to weigh on gold, as it doesn’t pay interest. Always trade with strict risk management. Your capital is the single most important aspect of your trading business. Please note that times displayed based on local time zone and are from time of writing this report. Click HERE to access the full HFM Economic calendar. Want to learn to trade and analyse the markets? Join our webinars and get analysis and trading ideas combined with better understanding of how markets work. Click HERE to register for FREE! Click HERE to READ more Market news. Andria Pichidi HFMarkets Disclaimer: This material is provided as a general marketing communication for information purposes only and does not constitute an independent investment research. Nothing in this communication contains, or should be considered as containing, an investment advice or an investment recommendation or a solicitation for the purpose of buying or selling of any financial instrument. All information provided is gathered from reputable sources and any information containing an indication of past performance is not a guarantee or reliable indicator of future performance. Users acknowledge that any investment in FX and CFDs products is characterized by a certain degree of uncertainty and that any investment of this nature involves a high level of risk for which the users are solely responsible and liable. We assume no liability for any loss arising from any investment made based on the information provided in this communication. This communication must not be reproduced or further distributed without our prior written permission.
    • SNAP stock, big day off support at https://stockconsultant.com/?SNAP
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.