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

    • Crypto hype is everywhere since it also making new riches as well, i however trade crypto little as compared to other forex trading pairs.
    • The ewallets can be instant withdrawals like skrill etc or they can also pay through crypto but not tested their crypto withdrawals so far.
    • I noticed that this broker has also started crypto cfds to trade. Crypto fever is almost everywhere in my opinion and the traders making good sums of money too.
    • MDLZ Mondelez stock, nice rally off the 64.18 support area at https://stockconsultant.com/?MDLZ
    • Date: 27th March 2025.   SNP500 Erases Gains as Trump’s Aggressive Trade Policy Shakes Markets   The SNP500 fell 1.35% on Wednesday wiping off the gains from the week. The decline is primarily due to fears of the upcoming US trade policy on April 2nd and beyond. In the President’s latest speech investors heard Trump confirm he looks to tax foreign cars with 25% tariffs and will add retaliation tariffs on Canada and the EU if they look to retaliate. The US Latest Comments On Global Trade The main concern for investors is the US President’s latest comments on the EU potentially collaborating with Canada. The two countries are aiming to push the US into a more favourable trade agreement. Donald Trump states that “if the EU works with Canada in order to do economic harm to the USA, large scale tariffs far larger than currently planned will be placed on both”. Up to now, both Canada and the EU have advised markets that they will retaliate. As a result, investors fear how these policies can trigger lower consumer demand, higher inflation and even a potential recession. The latest consumer confidence fell for the fourth day to 92.9, missing the 94.2 forecast. The economic outlook dropped to 65.2, a 12-year low, staying below the 80.0 recession warning level. However, the Federal Reserve so far in 2025 is advising the US economy remains stable despite the uncertainties. Furthermore, the US confirms they intend to impose a 25% tariff on all car imports and essential parts, including engines, transmissions, and electrical components. Many countries have already voiced their concerns over this decision.   Where Automakers Build Cars Sold in America   The Federal Reserve and Inflation Chicago Fed President Austan Goolsbee stated yesterday that policymakers may postpone monetary easing for 12 to 18 months due to market uncertainty. He also continues warning that rising inflation expectations could complicate efforts to slow it down. Another member to voice concerns is Alberto Musalem, a US economist and banker. The risk of US inflation remaining above the Fed’s 2% target, or even increasing, continues to grow, with higher import taxes potentially driving sustained price pressures. In the latest month, US inflation fell from 3.00% to 2.8% which is positive for the stock market, but only if it continues to fall towards 2.00%. There is currently only a 10% chance of an interest rate cut in May 2025 according to the Chicago Exchange. Economists advise the upcoming data will be vital and can significantly influence the risk appetite of the market. Traders will be focusing on today’s Final US GDP and tomorrow's Core PCE Price Index. If tomorrow’s PCE Price Index reads more than 0.3%, the stock market could quickly witness renewed pressure. SNP500 (USA500) - Technical Analysis Regardless of the above fundamental factors which are triggering the recent decline, the SNP500 has risen 0.35% during this morning’s Asian session. The bullish corrective wave currently measures 40% of yesterday’s bearish impulse wave. Though traders should also note that global indices including within the EU and Asia are continuing to decline.   SNP500 (USA100) 1-Hour Chart   The price in a 15-minute timeframe remains below most trend lines and Moving Averages. In addition to this, the price is again dropping below the neutral level of the RSI and the VWAP. If the price regains downward momentum and falls below $5,701.98, many traders may consider bearish momentum to be regaining ground. At this point, sell signals potentially can materialize. Further adding to the indications of downward price movement is the VIX index which is currently trading 0.60% higher. The higher the VIX index the lower the appetite there is towards the US stock market. Lastly, the US 10-Year Treasury Yields continue to rise adding further pressure on the stock market. The 10 Year Treasury Yields are currently trading 25 points higher. Key Takeaway Levels: The SNP500 dropped 1.35% as investors reacted to fears surrounding the upcoming US trade policy changes on April 2nd. This includes a potential 25% tariff on foreign cars and retaliatory tariffs against Canada and the EU. Fed officials warn that inflation risks remain high, with import tariffs potentially driving further price pressures. Inflation recently fell to 2.8%, but concerns persist about whether it will reach the Fed’s 2% target. Traders are closely monitoring upcoming US GDP and Core PCE Price Index data. If PCE exceeds 0.3%, stocks could face renewed pressure. Despite a slight rebound in the SNP500, indicators like RSI, VWAP, and the rising VIX index suggest bearish momentum could return, particularly if the index falls below $5,701.98. 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.   Michalis Efthymiou 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 Leveraged 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.
×
×
  • Create New...

Important Information

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