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

    • Date: 29th March 2024. GBPUSD Analysis: The Pound Trades Higher But For How Long? The global Stocks Markets are closed due to Easter Friday (Good Friday). The NASDAQ continued to follow the sideways trend while other indices again rose. The SNP500 reaches an all-time high, but the NASDAQ remains under pressure from Tesla, Meta and Apple. The Euro continues to trade lower against all major currencies including the US Dollar, Euro and Japanese Yen. The British Pound is the best performing currency during this morning’s Asian session. However, investors are largely fixing their attention on this afternoon’s Core PCE Price Index. GBPUSD – The Pound Trades Higher but For How Long? The GBPUSD is slightly higher than the day’s open and is primary due to the Pound’s strong performance. At the moment, the British Pound is increasing in value against all major currencies. However, the US Dollar Index is also trading 0.10% higher and for this reason there is a slight conflict here. If investors wish to avoid this conflict, the EURUSD is a better option. This is because, the Euro depreciating against the whole currency market avoiding the “tug-of-war” scenario. The GBPUSD is trading slightly lower than the 2-month’s average price and is trading at 49.10 on the RSI. For this reason, the price of the exchange is at a “neutral” level and is signalling neither a buy nor a sell. The day’s price action and future signals are possibly likely to be triggered by this afternoon’s Core PCE Price Index. Analysts expect the Core PCE Price Index to read 0.3% which is slightly lower than the previous month but will result in the annual figure remaining at 2.85%. The PCE rate is different to the inflation rate and the Fed aims for a rate between 1.5% to 2.00%. Therefore, even if the annual rate remains at 2.85%, as analysts expect, it would be too high for the Fed. If the rate increases, even if only slightly, the US Dollar can again renew bullish momentum and the stock market can come under pressure. This includes the SNP500. Investors are focused on the publication of data on the UK’s gross domestic product (GDP) for the last quarter of 2023: the quarterly figures decreased by 0.3%, and 0.2% over the past 12-months. This confirms the state of a shallow recession and the need for stimulation. The data, combined with a cooling labor market and a steady decline in inflation, increase the likelihood that the Bank of England will soon begin interest rate cuts. In the latest meeting the Bank of England representatives did not see any members vote for a hike. USA500 – The SNP500 Rises to New Highs, But Cannot Hold Onto Gains! The price of the SNP500 rises to an all-time high, before correcting 0.33% and ending the day slightly lower than the open price. Nonetheless, the index performs better than the NASDAQ which came under pressure from Tesla, Meta and Apple which hold a higher weight compared to the SNP500. For the SNP500, these 3 stocks hold a weight of 9.25%, whereas the 3 stocks make up 14.63% of the NASDAQ. The SNP500 is also supported by ExxonMobil’s gains due to higher energy prices. The market will remain closed on Friday due to Easter. However, the market will reopen on Monday for the US and investors can expect high volatility. Investors will also need to take into consideration how the PCE Price Index and the changed value of the US Dollar is likely to affect the stock market next week. 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 on how markets work. Click HERE to register for FREE! Click HERE to READ more Market news. Michalis Efthymiou Market Analyst 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.
    • MT4 is good and will be good until their parent company keep updating the software, later mt4 users will have to switch to mt5.
    • $SOUN SoundHound AI stock at 5.91 support area , see https://stockconsultant.com/?SOUN
    • $ELEV Elevation Oncology stock bull flag breakout watch , see https://stockconsultant.com/?ELEV
    • $AVDX AvidXchange stock narrow range breakout watch above 13.32 , see https://stockconsultant.com/?AVDX
×
×
  • Create New...

Important Information

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