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

    • CVNA Carvana stock, nice top of range breakout at https://stockconsultant.com/?CVNA
    • GDRX GoodRx stock, good day, watch for a bottom range breakout at https://stockconsultant.com/?GDRX
    • Date: 14th February 2025.   Can The NASDAQ Maintain Momentum at Key Resistance Level?     The price of the NASDAQ throughout the week rose more than 3.00% to bring the price back up to the instrument’s resistance level. However, while taking into consideration higher inflation, tariffs and the resistance level, could the index maintain momentum?   US Inflation Rises For a 4th Consecutive Month The US Consumer Price Index, or inflation, rose for a 4th consecutive month taking the rate even further away from the Federal Reserve’s target. Analysts were expecting the US inflation rate to remain unchanged at 2.9%. However, consumer inflation rose to 3.00%, the highest since July 2024, while Producer inflation rose to 3.5%. Higher inflation traditionally triggers lower sentiment towards the stock market as investors' risk appetite falls and they prefer the US Dollar. However, on this occasion bullish volatility rose. For this reason, some traders may be considering if the price is overbought in the short term.   Addressing these statistics, US Federal Reserve Chair Jerome Powell acknowledged that the Fed has yet to achieve its goal of curbing inflation, adding further hawkish signals regarding the monetary policy. Other members of the FOMC also share this view. Today, Raphael Bostic, President of the Federal Reserve Bank of Atlanta, stated that the Fed is unlikely to implement interest rate cuts in the near future. This is due to ongoing economic uncertainty following the introduction of trade tariffs on imported goods and other policies from the Republican-led White House.   Most of the Federal Open Market Committee emphasizes additional time is needed to fully assess the situation. According to the Chicago Exchange FedWatch Tool, interest rate cuts may not start until September 2025.   What’s Driving The NASDAQ Higher? Earnings data this week has continued to support the NASDAQ. Early this morning Airbnb made public their quarterly earnings report whereby they beat both earnings per share and revenue expectations. The Earnings Per Share read 25% higher than expectations and Revenue was more than 2% higher. As a result, the stock rose more than 14%. Another company this week that made public positive earnings data is Cisco which rose by more than 2% on Thursday. Another positive factor continues to be the positive employment data. Even though the positive employment data can push back interest rate cuts, the stability in the short term continues to serve the interests of higher consumer demand. The US Unemployment Rate fell to 4.00% the lowest in 8 months. Lastly, investors are also increasing their exposure to the index due to sellers not being able to maintain control or momentum. Some economists also increase their confidence in economic growth if Trump can obtain a positive outcome from the Ukraine-Russia negotiations.   However, during Friday’s pre-US session trading, 80% of the most influential stocks are witnessing a decline. The NASDAQ itself is trading more or less unchanged. Therefore, the question again arises as to whether the NASDAQ can maintain momentum above this area.   NASDAQ - News and Technical analysis In terms of technical analysis, the NASDAQ is largely witnessing mainly bullish indications on the 2-hour chart. However, the main concern for traders is the resistance level at $21,960. On the 5-minute timeframe, the price is mainly experiencing bearish signals as the price moves below the 200-period simple moving average.   The VIX, which is largely used as a risk indicator, is currently trading 0.75% higher which indicates a lower risk appetite. In addition to this, bond yields trade 6 points higher. If both the VIX and Bond yields rise further, further pressure may be witnessed for index traders.   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.
    • LUNR Intuitive Machines stock watch, attempting to move higher off 18.64 support, target 26 area at https://stockconsultant.com/?LUNR
    • CNXC Concentrix stock watch, pullback to 47.16 triple support area with bullish indicators at https://stockconsultant.com/?CNXC
×
×
  • Create New...

Important Information

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