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.

Andytick

Building a VolumeProfile Indicator with EasyLanguage

Recommended Posts

peak volume price... however with the two codes posted here im not sure how or if you can refer to the pvp on a trading strategy

 

That comment says more about you, than it does the indicator....

 

May i suggest you look around the forum, and research uses for PVP before you post detrimental remarks about particular codes.

Share this post


Link to post
Share on other sites
There are 2 reasons why I prefer ASCII:

First I know that you can plot a limited numbers of lines (trendLines) in a chart, so if I'd like to plot a daily histogram on many days, it would limit my plot.

 

Second it's a personal preference and in my opinion ASCII mapping like "------------" is easier to save with ADE and quicker to load as indicator than TLines, but its just my opinion.

Here form the first post 2 different resolutions using lines and ASCII:

2qx6e1d.png

 

soy4pg.png

 

Folks in this image we see the POC, while if I want see the PVP, how could I do?

 

I?d like to see a line for POC and Another for PVP.

 

I don't undesrtand what is exactky the difference, and what is the best, could you explain please?

Share this post


Link to post
Share on other sites

 

Grazie tuccio, senti hai skype ti va di sentirci per una chiaccherata?

 

Ci vai a mechanica a Milano?

 

Volevo chiederti se per visualtrader per visualtrader puoi postare il PVP e il POC, mi sembra che già lhai con le linee blu? ti ho posto su investireoggi perchè sul FOL mi hanno bannato e non posso mai piu scrivere.

 

A presto

Share this post


Link to post
Share on other sites
Grazie tuccio, senti hai skype ti va di sentirci per una chiaccherata?

 

Ci vai a mechanica a Milano?

 

Volevo chiederti se per visualtrader per visualtrader puoi postare il PVP e il POC, mi sembra che già lhai con le linee blu? ti ho posto su investireoggi perchè sul FOL mi hanno bannato e non posso mai piu scrivere.

 

A presto

 

ma quale Visual Trader a quale Milano :crap::crap:

 

Sto pubblicando una guida sull'analisi dei volumi con Multicharts sul fol :missy:

Share this post


Link to post
Share on other sites

allora non vuoi capire...quel grafico su VT è approssimativo e non ha la precisione di Multicharts...ma credi che se il prezzo su VT si trovi su una deviazione standard non vuol dire che si trovi veramente li!!! con VT è tutto sballato perfino il PVP e anche il VWAP...se fai trading usando quest indicatori su VT ti farai molto male...perchè gli indicatori su VT non rispecchiano la realtà di quello che sta succedendo sul mercato....

Share this post


Link to post
Share on other sites

tuccio grazie per i chiarimenti, quello che cercavo di capire è notare quanto i valori sono diversi da multicharts e visualtrader per fare un confronto. L'unica cosa è che per i titoli italiani e futures fib e minifib, sono costretto ad usare VT per avere i dati e lo storico, ho provato a fare il collegamento DDE con multicharts ma non regge, bisognerebbe farlo con le API che traderlink te le da anche il fatto è cjhe non sono programmatore, quelli di MC magari ci metterebbero 2 secondi a collegare il feed di VT su MC.

 

Non mi è chiaro questo

 

ma credi che se il prezzo su VT si trovi su una deviazione standard non vuol dire che si trovi veramente li!!!

??

 

 

 

allora il vwap lo hai pubblicaro ed effettivamente ci sono valori che ogni tanto non tornano perchè lo ho confrontati.

 

Il PVP vorrei confrontarlo anche quello ecco perchè te lo chiedo, poi magari la cosa segnalarla all'assistenza traderlink per vedere se migliorano, cerco di fare qualcosa di costruttivo, solo che non ho i codi, tu mi sembra che riuscito anche a codificare il volume bias o sbaglio?

 

Lo so che se devo fare trading seguo i valori di mc e non di Vt, però è anche vero che non ho bisogno di una ferrari,. In ogni caso mc la compro a fine mese, ideale sarebbe atrtaccatala a directa e prendere i dati da li.

 

Quindi se puoi manda i codi oer vt, ciao.

 

PS

Hai fatto un bellissimo lavoro sul FOL su mc, complimenti.

ciao.

Share this post


Link to post
Share on other sites

Non è una questione di "Ferrari", ma vuoi davvero paragonare il flusso dati di Zen-Fire a quello di Directa???? I codici per VT li ho postati una volta sul forum di investireoggi e poi ho fatto un paragone tra una giornata di trading monitorata contemporaneamente su VT e Multicharts entrambi con gli indicatori caricati e a fine giornata mi sono messo a ridereeeee....Inoltre se metti VT a 1 tick e carichi il PVP dopo 15 minuti crasha...questa anche perchè il linguaggio di VT è limitato...non è un linguaggio di programmazione completo come quello di Multicharts..per non parlare del VWAP su VT...una barzelletta ahahahahah...

Share this post


Link to post
Share on other sites

Potresti per favore inviarmeli in pm, i codici per visualtrader del pvp, volume bias ecc... non li riesco a trovare, ho trovato solo quelli del vwap con le 2 sd. Grazie mille.

Secondo te fare presente questa discrepanza a directa e a visualtrader cambierebbe qualcosa?

Per caso hai provato anche con metastock e prorealtime o la T£ per capire come se

la cavano nel confronto ?

Share this post


Link to post
Share on other sites

Non posso postarteli perchè non li ho più in quanto ho disistallato tutta la cartella VT perchè mi dava problemi con l'antivirus e poi non uso più. Fare presente queste cose a Directa e company non cambierebbe niente...a loro poco importa, il loro business va già bene così (l'amministratore delegato di Directa una volta è intervenuto sul fol dicendo che questa dei volumi è solo una moda passeggera). Non esiste nessun Volume Bias per VT.

 

Continuiamo la discussione sul fol prima che ci caccino da quà...

Share this post


Link to post
Share on other sites

Anybody could help me please,

 

I tried to use the code in the post 38 and it compiles ok but when I try to insert the indicator on a 1 tick chart it gives me the following error msg:

 

- Can't open/create file: "C:/temp/VolumeProfile.txt". -

 

Anybody could help me please.

thanks

mark

Share this post


Link to post
Share on other sites
Anybody could help me please,

 

I tried to use the code in the post 38 and it compiles ok but when I try to insert the indicator on a 1 tick chart it gives me the following error msg:

 

- Can't open/create file: "C:/temp/VolumeProfile.txt". -

 

 

You need to Save As : What ever name you want to call the file.

 

Sounds as if you're trying to insert the original .txt file and not the .el or .eld code.

 

Hope this helps.

 

VT

Share this post


Link to post
Share on other sites
You need to Save As : What ever name you want to call the file.

 

Sounds as if you're trying to insert the original .txt file and not the .el or .eld code.

 

Hope this helps.

 

VT

 

Hello ValueTrader,

maybe I explained myself not correctly.

I already imported the code in Power Language Editor of Multicharts and I gave to it the name "Volume profile" and it compiled perfectly.

The problem rise when I try to insert the indicator in a 1 tick chart giving me the error that I reported: - Can't open/create file: "C:/temp/VolumeProfile.txt". -

thanks

Share this post


Link to post
Share on other sites

Manually create a directory named C:\temp\ and then try running the indicator again.

 

[edit] The forum software interpreted the name of the directory I specified as some smiley face but you should be able to make sense of the concept anyway.

 

Hello ValueTrader,

maybe I explained myself not correctly.

I already imported the code in Power Language Editor of Multicharts and I gave to it the name "Volume profile" and it compiled perfectly.

The problem rise when I try to insert the indicator in a 1 tick chart giving me the error that I reported: - Can't open/create file: "C:/temp/VolumeProfile.txt". -

thanks

Share this post


Link to post
Share on other sites
Hello ValueTrader,

maybe I explained myself not correctly.

I already imported the code in Power Language Editor of Multicharts and I gave to it the name "Volume profile" and it compiled perfectly.

The problem rise when I try to insert the indicator in a 1 tick chart giving me the error that I reported: - Can't open/create file: "C:/temp/VolumeProfile.txt". -

thanks

 

try it on a 60 min chart, or a day chart...

Share this post


Link to post
Share on other sites

Thanks onesmith, thanks Tams,

I created the file VolumeProfile.txt in C:/temp.

When I open a chart with 30 minutes candles 50 days history and I insert the Volume Profile indicator I get the answer: - Message Error in study "Volume Profile" : : Array bounds. Wrong index value : -4."

The last number "-4" change changing the number of history days.

It is -4 with 50 days history and it becomes -24 with 25 days history.

Could you pls. help me.

I have no clue about the meaning of the message error.

Many thanks

mark

Share this post


Link to post
Share on other sites
Thanks onesmith, thanks Tams,

I created the file VolumeProfile.txt in C:/temp.

When I open a chart with 30 minutes candles 50 days history and I insert the Volume Profile indicator I get the answer: - Message Error in study "Volume Profile" : : Array bounds. Wrong index value : -4."

The last number "-4" change changing the number of history days.

It is -4 with 50 days history and it becomes -24 with 25 days history.

Could you pls. help me.

I have no clue about the meaning of the message error.

Many thanks

mark

 

what instrument you are charting?

Share this post


Link to post
Share on other sites

Mark, the file error is caused by the use of forward slashes rather than back slashes. The out of bounds error (on 6e) occurs because the index is keyed directly to price rather than something like index=p+offset to center price in the array; There's also a conceptual error that no one has mentioned, where the reserved word volume should be changed to ticks.

Share this post


Link to post
Share on other sites

I never knew where this indicator originated from....

Over the years I have been playing & trying to figure out the code... There are a lot of ambiguous ValueNN references that who knows what they reference.

 

Anyway... There are a lot of user defined inputs in my re-coded TPOpro indicator...

you are able to turn off different plots like the textLables , change line colors, and even change the ABC Text profile histogram to whatever symbol you like ( "_", "+","*","-","8")

{********************************************************************
TPO Pro  indicator   Original  TPO Pro5   by ????  
5c 5b 
203.21  Added VAH VAL Lines & PriceAxis Markers, Flipped Histogram
30303   Seperating Plot Colors, Widths , History from Current Plots
       Removed Code for Letters, was unnecessary duplicated
30304   Major Overhaul , changed names, cleaned code,  more readable 
30309 Removed Today's VA Lines replotting next to new lines 
30414 Input Names changed, Todays VA Lines plot once
31002 same as 40101 Added a lot.
wishlist: plot multiple days histo.... extend VAH &VAL Lines 

********************************************************************}
[LegacyColorValue = false];

input:
_HISTOGRAM_PLOT_SETTINGS_(0),
 PlotTPOHistogramABcText  (false),
 HistogramTextColor       (magenta),  
 HistogramLetter_Symbol   (""),
 HistoSymbol_if_ABCTxt_False ({MustHave "Quotes" InputAbove}{MustHave "Quotes" InputAbove}{MustHave "Quotes" InputAbove}{MustHave "Quotes" InputAbove}{MustHave "Quotes" InputAbove}{MustHave "Quotes" InputAbove}{MustHave "Quotes" InputAbove}{MustHave "Quotes" InputAbove}{MustHave "Quotes" InputAbove}{MustHave "Quotes" InputAbove}{MustHave "Quotes" InputAbove}{MustHave "Quotes" InputAbove}{MustHave "Quotes" InputAbove}{MustHave "Quotes" InputAbove}{MustHave "Quotes" InputAbove}{MustHave "Quotes" InputAbove}{MustHave "Quotes" InputAbove}{MustHave "Quotes" InputAbove}{MustHave "Quotes" InputAbove}{MustHave "Quotes" InputAbove}{MustHave "Quotes" InputAbove}{MustHave "Quotes" InputAbove}{MustHave "Quotes" InputAbove}{MustHave "Quotes" InputAbove}0),

_VA_RANGE_TEXT_LABELS_(0),
 ShowTodaysVARange_TextString (false),
 TodaysVARange_TextStringColor (white), 
 ShowPriorVARangeTextLables    (false),
 ColorPastVARangeTextLabels    (darkmagenta),

_VARANGE_VERTICAL_LINESnDOT_(0),  
 POCdot_Color              (white), 
 POCdot_ThicknessWidth     (5),
 VArangeVerticalLine_Color (magenta), 
 VArangeVerticalLine_Width (5),
//cPastVAVerticalRangeLine  (magenta),
//ColorPastVerticalPOCDots  (white),
//wPastVA_VerticalRangeLine (5),
//wPastVAMidPointDots       (5), 
_TODAYS_VAH_VAL_LINES_(0),
WidthTodaysVA_HighLowLines (2),
TodaysVAHigh_LineColor (blue),
TodaysVALow_LineColor (red),
TodaysPOC_LineColor (yellow),
_PRIORHISTORY_VAH_VAL_LINES_(0),
ShowPriorHistoryVALines     (false),
cPastVAHigh_LineColor       (red),
cPastVALow_LineColor        (blue),
wPastVAHigh_VALow_LineThickness (1),

_REPLOT_PRICE_BARS_SETTINGS_ (0),
 RePlotPriceBarsOverHistgram (true), 
 ReplotPriceBars_LineWidth   (2),
 ReplotPriceBarsWick_Color       (black),
 PriceBarCloseDot_Color      (darkgray),
 cBarUp (green),
 cBarDN (rgb(200,0,0)),

_LAST_PRICE_FLOATING_LINE_(0),  
 ShowCurrentLastPriceLine (true),
 LastPrice_LineColor      (LightGray), 

_SETTINGS_(0),
 ValueAreaRange_Percent (.7),
 Stime                  (1615),
 compress               (1),
 len                    (30),
 letter_1               (2),
 ValueAreaSize_n        (4); 


vars:
intrabarpersist Color(0),
x(0),y(0),TPOtotal(0),
//lett("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"}),
CurTxt(""),CurLet(""),OldLet(""),letter1(0),lcount(1),
dHi(0),dLo(0),HH(0),LL(0),BarHi(0),BarLo(0), 
Time0(0),DayNum(0),d0(0),dl(0),DayLow(0),  
VA(0),VaMid(0),VAP(0),VAH(0),OldVAH(0),VAL(0),OldVAL(0),Valsize(0), //  {"vap"=ValueAreaPercent}
PC(0),PC2(0),et(0),FP(0),skp(0),tot(0),tpstr("00"),xpts(0),  
vCurPOC(0),POC(0),OldPOC(0),CP(0),//                              {"CP "= CenterPoint Center of Distribution ?POC?} 
nuFlag(0),Flag2(0),NewDayFlag(0),
cVrtRng(0), wVrtRng(0),  TL_VrtPOC(0), TL_VrtRng(0), TL_hVrtRng(0),      
Labl(0),cRngLbl(0),chRngLbl  (0),  
Price(0),cLstPrc(0),TL_LstPrc(0),         
cPOC(0),cVAH(0),cVAL(0),chVAH(0),chVAL(0),ctPOC(0),    
whVaHL(0),wVaHL(0),wPOC(0),
phVaHL(false),pLstPrc(false),pHisLbl(false),ptLabl(false),
TL_POC(0),TL_VAH(0),TL_VAL(0),      
ctHisto(0), pHistoTxt(true), HistoChar("8"),
pCurLoc(0), D1p(0),D2p(0),T1p(0),T2p(0),
PBWick(0),cPBWick(0),wPBWick(0),pPBWick(false),
PBBody(0),cPBBody(0),wPBBody(0),     
mintick(0);

array: aPRI[1000](0),
      aTPO[1000](0),
      aPriStr[1000]("");  {? Primary String ?}

if currentbar = 1  then begin
 letter1 =  letter_1 ;
 ctHisto = HistogramTextColor ;
//cPOC    = ColorPastVerticalPOCDots ;
 cLstPrc =  LastPrice_LineColor ;
 cVrtRng = VArangeVerticalLine_Color ;
//cVrtRng = cPastVAVerticalRangeLine ;
 cPBWick = ReplotPriceBarsWick_Color ;
 cPBBody =  PriceBarCloseDot_Color ;
 cRngLbl = TodaysVARange_TextStringColor ;
 chRngLbl= ColorPastVARangeTextLabels ;
 cPOC    = POCdot_Color ;
 ctPOC   = TodaysPOC_LineColor;
 cVAH    = TodaysVAHigh_LineColor ;
 cVAL    = TodaysVALow_LineColor  ;
 chVAH   = cPastVAHigh_LineColor ;
 chVAL   = cPastVALow_LineColor ;
 wPOC    = minlist (6, POCdot_ThicknessWidth );
 wVrtRng = minlist (6, VArangeVerticalLine_Width );
//wVrtRng = minlist (6, wPastVA_VerticalRangeLine );
 wVaHL   = minlist (6, WidthTodaysVA_HighLowLines );
//wPOC    = minlist (6, wPastVAMidPointDots );
 whVaHL  = minlist (6, wPastVAHigh_VALow_LineThickness );
 wPBWick = minlist (6, ReplotPriceBars_LineWidth );
 wPBBody = minlist (6, wPBWick + 1 ); 
//wVaHL    = minlist (6, WidthTodaysVA_HighLowLines );
//wTodayVAL= minlist (6, wTodaysValueAreaLowLine );
 pHistoTxt= PlotTPOHistogramABcText ;
 HistoChar= HistogramLetter_Symbol ;
 pPBWick  = RePlotPriceBarsOverHistgram ;
 pLstPrc  = ShowCurrentLastPriceLine ;
 ptLabl   = ShowTodaysVARange_TextString;
 pHisLbl  = ShowPriorVARangeTextLables ;
 phVaHL   = ShowPriorHistoryVALines ;
 VAP      = ValueAreaRange_Percent ;
 Valsize  = ValueAreaSize_n ;        {Line Thickness for VA horiz lines}
 mintick  = 1 point * minmove * compress ; 
 xpts     = 500 * mintick ;
end;

{*****  START PROGRAM IF TIME IS WITHIN DAY SESSION HOURS *****}
if BarStatus(1) = 2 then begin

nuFlag = 0 ;
if  Time0 <= sess1endtime 
and t > sess1endtime 
and sess2starttime <> 0 
 then nuFlag = 1
 else
if  d <> d0 
and sess2starttime = sess2endtime 
 then nuFlag = 1
 else
if Time0 = sess1endtime then nuFlag = 1 ;    

if NuFlag = 1 then begin
 if currentbar > 1  then begin
  if  cVrtRng <> 0     { if  PlotHistogram = true }
  and Flag2 = 0
   then begin
    VaMid = 0 ;
    TPOtotal = 0 ;
    POC = dLo ;
    CP = dLo + (( dHi - dLo )*.5);//    {"CP "=CenterPoint center of dist.}

    for x = dLo to dHi  begin 
     if aPriStr[x] <> "" then begin
     //aPriStr[x] = nutpstr( aTPO[x], aPriStr[x], aPRI[x]);     {places NumberCharacter in front of Histogram Text History Plots}
       TPOtotal = TPOtotal + aTPO[x];    {Total TPO Count}

       if  aTPO[x] = VaMid 
       and x <= CP  
        then POC = x ;

       if  aTPO[x] = VaMid 
       and   x > CP 
       and ( x - CP ) < AbsValue( CP - POC ) 
        then POC = x ;

       if aTPO[x] > VaMid then begin
         POC  = x ;
         VaMid = aTPO[x] ;
       end;
     end; //  {end of "if aPriStr[x] <> "" then begin"}
    end;    {end of "for x = dLo to dHi  begin "}

    VA = TPOtotal * vap ;
    x = VaMid ; 
    VAH = POC ; 
    VAL = POC ;
    x = 0 ;

    while x < VA  begin
     value19 = aTPO[VAH+1] + aTPO[VAH+2];
     value20 = aTPO[VAL-1] + aTPO[VAL-2];

     if value19 >= value20 then begin
      if x + aTPO[ VAH +1] >= VA
       then begin
        x = x + aTPO[ VAH +1];
        VAH = VAH + 1 ;
      end else begin
        x = x + value19;  
        VAH = VAH + 2 ;
      end;
     end else begin

     if x + aTPO[ VAL -1] >= VA
      then begin
       x = x + aTPO[ VAL -1]; 
       VAL = VAL - 1 ;
     end else begin
       x = x + value20;
       VAL = VAL - 2 ;
     end;
     end;
     end;//     {end of ":if value19 >= value20"} 
    end;//     {end of " while x < VA  begin"}


//{***** PAST HISTORY VALUE AREA TEXT LABLES  below pricebars *********}   
    if  VAH > dHi  then   VAH = dHi ;     {"tHi"=Today'sHigh}
    if  VAL < dLo  then   VAL = dLo ;    
    VAH = FP + ((VAH-500) * mintick );
    VAL = FP + ((VAL-500) * mintick );
    vCurPOC = FP + (( POC -500 ) * mintick );

    if  pHisLbl  then begin
      Labl = text_new( D2p , T2p , dl - mintick ,"VA:"+mp_str32(VAL) + " " + mp_str32(VAH));
      text_setstyle( Labl , 0 , 2 );    
      text_setcolor( Labl , chRngLbl );
    end;

{***** SETS PAST HISTORY VA VERTICAL LINE ****************************************************} 
    TL_hVrtRng = tl_new( D1p , T1p , VAH , D1p , T1p , VAL );
    tl_setcolor( TL_hVrtRng , cVrtRng );
    tl_setsize ( TL_hVrtRng , wVrtRng );

{***** SETS PAST HISTORY POC VERTICAL-LINE/DOT OF VALUE AREA ******************************************} 
    TL_VrtPOC = tl_new( D1p , T1p , vCurPOC + mintick /15, D1p , T1p , vCurPOC - mintick /15 ); 
  //tlVACpt = tl_new ( D1p , T1p , vCurPOC + mintick /15, D2p , T1p , vCurPOC - mintick /15 ); 
  //Above tl_new Creates a POC Line spanning the entire day               
    tl_setcolor( TL_VrtPOC , cPOC );
    tl_setsize ( TL_VrtPOC , wPOC );

{      
{***** VA HISTOGRAM RED TEXT row **************************************************************}  
    PC2 = 0 ;
    for y = dLo to dHi begin
     Price= FP + ((y-500) * mintick ) ;                    
     if Price <= pc  then  PC2 = y ;  
    end;

    if PC2 = 0  then  PC2 = BarLo ;
    CurTxt = aPriStr[pc2] ;
    if RightStr(  CurTxt , 1) <> "<" 
     then begin
      text_setstring( aPRI[pc2] ,  CurTxt + " <");
      text_setcolor ( aPRI[pc2] , cClose );
    end;
}       
 end;    {end of "if currentbar > 1  then begin" line164}

 D1p  = d - 1 ;               {Used on TLs as Yesterday  D1p,T1p=1stBar B4 New Session} 
 T1p  = SessionEndTime(1,1) ; {Used on TLs as begining Time}
 T2p  = t ;                   {1st TimeStamp of New Day (for line locations)}
 D2p  = d ;                   { Date/Day to Plot (for line locations)}
 Labl = 0 ;
 TL_hVrtRng = 0 ;   {30304xx }

{***** HISTOGRAM TEXT LETTERS *************************************************} 
 for value1 = dLo to dHi begin
   aPriStr[value1] = "" ;
   aTPO[value1]    = 0 ;
 end;

 //CurLet  = curletstr( stime ,len, letter1 );
 //Old CurLet  =  CurLet  ;
 NewDayFlag = 0 ;
 DayLow  = l ;  
 FP   = o   ; 
 dHi  = 500 ;
 dLo  = 500 ;
//30425  //aTPO[500] = 1 ;                                 
 //aPRI[500] = text_new(d, T2p ,o,"   >" +  CurLet  );
 //   aPriStr[500] = "   >" +  CurLet  ;
 //text_setstyle( aPRI[500] , 1 , 2 );    
 //text_setcolor( aPRI[500] , darkgray);
 HH    = o ; 
 LL    = o ; 
 VaMid = 1 ; 
 tot   = 1 ;
 dl    = l ;
 value22 = currentbar;

 if d = juliantodate(lastCalcJdate) then Flag2 = 1 ;

end;   {end of "if NuFlag = 1 then begin" line161} 

{ CURRENT DAY HISTOGRAM PLOT SYMBOL/CHARACTER instead of ABCs chose one letter}
if pHistoTxt
then   CurLet  = curletstr( stime , len , letter1 )
else   CurLet  = HistoChar ; 

Time0 = t ; 
d0 = d ; 
pc = C ;
BarHi = intportion(( xpts + H - FP + ( mintick /10))/ mintick );
BarLo = ceiling   (( xpts + l - FP - ( mintick /10))/ mintick );

if BarHi > dHi  then  dHi = BarHi ;     {tH = Today's High price}
if BarLo < dLo  then  dLo = BarLo ;
if low   < dl   then  dl = l ;

if  datacompression = 0 
and currentbar > value22 
then begin
//lcount = lcount + 1 ;                 {"lcount"=LetterCount a-z,A-Z}
//if lcount = 53  then lcount = 1 ;     {Reset to first of 52 letters}
//CurLet  = midstr( lett , lcount ,1);
 HH = o ; 
 LL = o ;
 NewDayFlag = NewDayFlag + 1 ; 
end;

value22 = CurrentBar ;
if  datacompression = 1
and OldLet <> CurLet
then begin
 HH = o ; 
 LL = o ;
 NewDayFlag = NewDayFlag + 1 ;
end;

{***** HISTOGRAM LETTERS *****************************************************}
for y = BarLo to BarHi  begin
Price  = FP + ((y-500) * mintick );
CurTxt = aPriStr[y] ;

if  CurTxt = "" then begin
  aTPO[y] = 1 ;
  aPRI[y] = text_new( D2p ,2300, Price ,"    " + CurLet );  // aPRI[y]= text_new(D2p,T2p,price,"    "+ CurLet );
  aPriStr[y] = "    " + CurLet ;                            // aPriStr[y]="    "+ CurLet ;
{SETS HISTO PLOT Left1/VaMid0/Right2 of PriceBar}
  text_setstyle( aPRI[y],1,0);                             //text_setstyle( aPRI[y],0,0);
  text_setcolor( aPRI[y],ctHisto);
end 
 else begin
if leftstr(  CurTxt ,1) <> CurLet 
 then begin                                      //if RightStr( CurTxt,1) <>  CurLet  then begin
  text_setstring( aPRI[y] , CurTxt + CurLet );  //text_setstring( aPRI[y], CurTxt+ CurLet );
  aPriStr[y] =  CurTxt + CurLet  ;
  aTPO[y]    = aTPO[y] + 1 ;
end;
end;
end;    {end of "for y = BarLo to BarHi begin"}

{***** HighestHigh LowestLow of the Day **************************************}
if  h > HH  then  HH = h ;
if  l < LL  then  LL = l ;

{*************************************************************}
if  cVrtRng <> 0     {if No color speced then no Histogram calced or plotted}
and lastbaronchart  
then begin
 VaMid   = 0 ;  
 value16 = 0 ;
 TPOtotal = 0 ;
 POC     = dLo ;
 CP      = dLo + ( dHi - dLo )/2; {center of dist.}

//{***** TODAY'S HISTOGRAM PLOT ************************************************} 
 for x = dLo to dHi  begin 
  if  aPriStr[x] <> "" then begin
  //aPriStr[x] = nutpstr( aTPO[x] , aPriStr[x] , aPRI[x] );     {Numbered Outline of Today's Histogram }
    TPOtotal   = TPOtotal + aTPO[x] ;                             {total tpo count}
    if  aTPO[x] = VaMid and x <= CP   then POC = x ;
    if  aTPO[x] = VaMid and x >  CP  
    and (x- CP ) < absvalue(CP - POC ) then POC = x ;

    if aTPO[x] > VaMid then begin
      POC   = x ;
      VaMid = aTPO[x];
    end;
  end;    {end of "if  aPriStr[x] <> "" then begin"}
 end;    {end of "for x = dLo to dHi begin"}

 VA = TPOtotal * vap ;

 if l < DayLow  then begin    {if Low < Dailylow}
   DayLow = l ;
   Price = FP +(( dLo -501)  * mintick );
   if Labl <> 0 then Text_SetLocation( Labl , D2p , T2p , Price );
 end;

//{***** VALUE AREA TEXT   ploted above PriceBars CURRENT DAY *****************************} 
 if ptLabl then begin 
  if Labl = 0 then begin
   pCurLoc = GetAppInfo(aiHighestDispValue) - (10 * mintick) ;  {New Location at Top of Chart}
 //Price = FP +(( dLo -501) * mintick );           {Prior30321, VA Txtlocation difficult to see }
   Labl  = text_new( D2p , T2p , pCurLoc, "-" );   //Labl  = text_new( D2p , T2p , Price, "-" );
   text_setstyle( Labl , 2 , 3 );               
   text_setcolor( Labl , cRngLbl );   //text_setcolor(Labl,cRngLbl);
  {Current VA Values & TextPlots are Updated on Line459}
  end;
 end;

 if VA <> 0 then begin
   value61 = value18; 
   x   = VaMid ;
   VAH = POC   ;
   VAL = POC   ;

   while x < VA begin
     value19 = aTPO[ VAH +1] + aTPO[ VAH +2] ;  
     value20 = aTPO[ VAL -1] + aTPO[ VAL -2] ;
     if value19 >= value20  then begin
      if x + aTPO[ VAH +1] >= VA  
       then begin
        x  = x + aTPO[ VAH +1] ;
        VAH = VAH + 1 ;
      end else begin
        x = x + value19 ;  
        VAH = VAH + 2 ;
      end;
     end else begin
     if x + aTPO[ VAL -1] >= VA  then begin
       x = x + aTPO[ VAL -1] ; 
       VAL = VAL - 1 ;
     end else begin
       x = x + value20 ;  
       VAL = VAL -2;
     end;                
     end;
   end;    {end of "while x < VA begin"}

//{***** MOST CURRENT VALUE AREA & POC CENTER POINT *************************}    
   if VAH > dHi  then  VAH = dHi ; 
   if VAL < dLo  then  VAL = dLo ;    
   OldPOC = POC ;
   OldVAH = VAH ;
   OldVAL = VAL ;
   VAH    = FP + ((VAH-500) * mintick );
   VAL    = FP + ((VAL-500) * mintick );
   if NewDayFlag = 1  then  value63 = t ;

   if VAH > VAL and NewDayFlag > 1  then begin
    if TL_VrtRng  = 0 
     then begin

//{***** CURRENT DAY VALUE AREA VERTICAL LINE **************************************}
      TL_VrtRng  = tl_new( D1p , T1p , VAH , D1p , T1p , VAL );
      tl_setcolor  ( TL_VrtRng  , cVrtRng );
      tl_setsize   ( TL_VrtRng  , wVrtRng );               //tl_setsize(VrtRng,wVrtRng);
      vCurPOC = FP +(( OldPOC - 500 ) * mintick );

//{*** CURRENT DAY POC,VAL & VAH  (Vertical & Horizontal Lines) ********************}
      TL_VrtPOC = tl_new( D1p , T1p , vCurPOC + mintick /15, D1p , T1p , vCurPOC - mintick /15);
      tl_setcolor( TL_VrtPOC , cPOC ) ;                 //tl_setcolor(tlVACpt,cVrtRng);
      tl_setsize ( TL_VrtPOC , wPOC  ) ;                //tl_setsize(tlVACpt,value88);

      plot1( vCurPOC , "POCaxis", ctPOC ) ;
      plot2( VAH ,"VAHaxis", cVAH ); 
      plot3( VAL ,"VALaxis", cVAL );


//    {***** Horizontal Lines *****} 
      TL_VAH = tl_new( D2p , T2p , VAH , D2p , t , VAH );
      tl_setcolor( TL_VAH , cVAH  );
      tl_setsize ( TL_VAH , wVaHL );
      TL_VAL = tl_new( D2p , T2p , VAL , D2p , t , VAL );
      tl_setcolor( TL_VAL , cVAL  );
      tl_setsize ( TL_VAL , wVaHL );
      TL_POC = tl_new( D2p , T2p , vCurPOC , D2p , t , vCurPOC );
      tl_setcolor( TL_POC , ctPOC );
      tl_setsize ( TL_POC , wVaHL );
    end 
     else begin
    if OldVAH <> VAH       
     then begin
      tl_setbegin( TL_VrtRng , D1p , T1p , VAH );
    //tl_setbegin( TL_VAH , D2p , T1p , VAH );     {Current ValueAreaHigh Line}
    //tl_setend  ( TL_VAH , D2p , t   , VAH );
    end;

    if OldVAL <> VAL
     then begin
      tl_setend  ( TL_VrtRng  , D1p , T1p , VAL );
    //tl_setbegin( TL_VAL , D2p , T1p , VAL );
    //tl_setend  ( TL_VAL , D2p , t   , VAL );
    end;
    end;
  end;     {end of "if VAH > VAL and NewDayFlag > 1  then begin"}

     if   NewDayFlag > 1 {and value61 <> value18 }
      then begin
        vCurPOC = FP + (( OldPOC - 500 ) * mintick );
        tl_setbegin( TL_VrtPOC , D1p , T1p , vCurPOC + mintick / 15 );
        tl_setend  ( TL_VrtPOC , D1p , T1p , vCurPOC - mintick / 15 );
     end;

     text_setstring( Labl ,"CurVA:"+mp_str32( VAL ) + " " + mp_str32( VAH ));

  end;     {end of "if VA <> 0 then begin" line#300}
end;     {end of "if  cVrtRng <> 0 and lastbaronchart " line#263}


{**** PRIOR HISTORY VAH & VAL LINES ***********************************}

 If phVaHL  then begin 
   var: TL_hVAH (0), TL_hVAL (0);
   TL_hVAH = tl_new( D1p-1 , T1p , VAH , D2p , T2p , VAH );
   TL_hVAL = tl_new( D1p-1 , T1p , VAL , D2p , T2p , VAL );
   tl_setcolor( TL_hVAH , chVAH  );
   tl_setsize ( TL_hVAH , whVaHL );   
   tl_setcolor( TL_hVAL , chVAL  );
   tl_setsize ( TL_hVAL , whVaHL ); 
 end;


{***** MostRecent LastClosingPrice (floating Horizontal Line) ************************}
//var: TL_LstPrc (0);
if pLstPrc  then begin
  if  TL_LstPrc  = 0 
  and currentbar = 3 
   then begin
     TL_LstPrc = tl_new( value50 , value51 ,c,d,t,c );
     tl_setcolor  ( TL_LstPrc , cLstPrc   );           {Color of CurrentPrice floating Line}
     tl_setsize   ( TL_LstPrc , 1 );
     TL_SetExtLeft( TL_LstPrc , true );
  end else 
  if currentbar > 3 
  and LastBarOnChart  
   then begin
     tl_setend  ( TL_LstPrc ,d,t,c);
     tl_setbegin( TL_LstPrc , value52 , value53 ,c );

     tl_setend  ( TL_POC , d , t ,  vCurPOC );
     tl_setbegin( TL_POC , d , 930, vCurPOC );
     tl_setend  ( TL_VAH , d , t ,  VAH );
     tl_setbegin( TL_VAH , d , 930, VAH );
     tl_setend  ( TL_VAL , d , t ,  VAL );
     tl_setbegin( TL_VAL , d , 930, VAL );
   //if h > HH  then  tl_setend  ( TL_hVAH , d , t , VAL ); 

end;

  value52 = value50 ;
  value53 = value51 ;
  value50 = d ;
  value51 = t ;
end;

end; //{end of "if BarStatus(1)=2 then begin"} 
 {****  PRICEBAR REPLOT OVER TOP OF HISTOGRAM & LINES *****} 

if pPBWick then begin
 if C > C[1] and C[1] < C[2] then Color = green
  else
 if C < C[1] and C[1] > C[2] then Color = red
  else
 if C > O then Color = cBarUP  
  else         Color = cBarDN ;

 PBWick = tl_new( D, T , Low , D, T, High );
 tl_setcolor( PBWick , cPBWick );
 tl_setsize ( PBWick , wPBWick );   //tl_setsize ( PBWick , wPBWick );

 PBBody = tl_new( D, T, Open , D, T, Close );  
 tl_setcolor( PBBody , Color );
 tl_setsize ( PBBody , wPBBody );   //tl_setsize ( PBBody , wPBBody );       
end;     {end of "if pPBWick then begin"}

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.


  • Similar Content

    • By FMIND5
      Hello traders,
      I am interested in order flow trading and I will post some trades and predictions, some articles and ideology of a bit different understanding how price moves and why. May be this forum will be the right place. So, for the start I have  couple of charts of recent trade on oil. Also I did some comparison of two different software. Would be great to meet some traders who use order flow too. Lets see. I have a lots ideas and strategies to share. I don't use any traditional indicators, because just numbers are important for me.
       
       
       


    • By trading4life
      Hello, My name is trading4life.
      I just joined this forum.
  • Topics

  • Posts

    • Date: 16th April 2024. Market News – Stocks and currencies sell off; USD up. Economic Indicators & Central Banks:   Stocks and currencies sell off, while the US Dollar picks up haven flows. Treasuries yields spiked again to fresh 2024 peaks before paring losses into the close, post, the stronger than expected retail sales eliciting a broad sell off in the markets. Rates surged as the data pushed rate cut bets further into the future with July now less than a 50-50 chance. Wall Street finished with steep declines led by tech. Stocks opened in the green on a relief trade after Israel repulsed the well advertised attack from Iran on Sunday. But equities turned sharply lower and extended last week’s declines amid the rise in yields. Investor concerns were intensified as Israel threatened retaliation. There’s growing anxiety over earnings even after a big beat from Goldman Sachs. UK labor market data was mixed, as the ILO unemployment rate unexpectedly lifted, while wage growth came in higher than anticipated – The data suggests that the labor market is catching up with the recession. Mixed messages then for the BoE. China grew by 5.3% in Q1 however the numbers are causing a lot of doubts over sustainability of this growth. The bounce came in the first 2 months of the year. In March, growth in retail sales slumped and industrial output decelerated below forecasts, suggesting challenges on the horizon. Today: Germany ZEW, US housing starts & industrial production, Fed Vice Chair Philip Jefferson speech, BOE Bailey speech & IMF outlook. Earnings releases: Morgan Stanley and Bank of America. Financial Markets Performance:   The US Dollar rallied to 106.19 after testing 106.25, gaining against JPY and rising to 154.23, despite intervention risk. Yen traders started to see the 160 mark as the next Resistance level. Gold surged 1.76% to $2386 per ounce amid geopolitical risks and Chinese buying, even as the USD firmed and yields climbed. USOIL is flat at $85 per barrel. Market Trends:   Breaks of key technical levels exacerbated the sell off. Tech was the big loser with the NASDAQ plunging -1.79% to 15,885 while the S&P500 dropped -1.20% to 5061, with the Dow sliding -0.65% to 37,735. The S&P had the biggest 2-day sell off since March 2023. Nikkei and ASX lost -1.9% and -1.8% respectively, and the Hang Seng is down -2.1%. European bourses are down more than -1% and US futures are also in the red. CTA selling tsunami: “Just a few points lower CTAs will for the first time this year start selling in size, to add insult to injury, we are breaking major trend-lines in equities and the gamma stabilizer is totally gone.” Short term CTA threshold levels are kicking in big time according to GS. Medium term is 4873 (most important) while the long term level is at 4605. 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. Andria Pichidi 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.
    • Date: 15th April 2024. Market News – Negative Reversion; Safe Havens Rally. Trading Leveraged Products is risky Economic Indicators & Central Banks:   Markets weigh risk of retaliation cycle in Middle East. Initially the retaliatory strike from Iran on Israel fostered a haven bid, into bonds, gold and other haven assets, as it threatens a wider regional conflict. However, this morning, Oil and Asian equity markets were muted as traders shrugged off fears of a war escalation in the Middle East. Iran said “the matter can be deemed concluded”, and President Joe Biden has called on Israel to exercise restraint following Iran’s drone and missile strike, as part of Washington’s efforts to ease tensions in the Middle East and minimize the likelihood of a widespread regional conflict. New US and UK sanctions banned deliveries of Russian supplies, i.e. key industrial metals, produced after midnight on Friday. Aluminum jumped 9.4%, nickel rose 8.8%, suggesting brokers are bracing for major supply chain disruption. Financial Markets Performance:   The USDIndex fell back from highs over 106 to currently 105.70. The Yen dip against USD to 153.85. USOIL settled lower at 84.50 per barrel and Gold is trading below session highs at currently $2357.92 per ounce. Copper, more liquid and driven by the global economy over recent weeks, was more subdued this morning. Currently at $4.3180. Market Trends:   Asian stock markets traded mixed, but European and US futures are slightly higher after a tough session on Friday and yields have picked up. Mainland China bourses outperformed overnight, after Beijing offered renewed regulatory support. The PBOC meanwhile left the 1-year MLF rate unchanged, while once again draining funds from the system. Nikkei slipped 1% to 39,114.19. On Friday, NASDAQ slumped -1.62% to 16,175, unwinding most of Thursday’s 1.68% jump to a new all-time high at 16,442. The S&P500 fell -1.46% and the Dow dropped 1.24%. Declines were broadbased with all 11 sectors of the S&P finishing in the red. JPMorgan Chase sank 6.5% despite reporting stronger profit in Q1. The nation’s largest bank gave a forecast for a key source of income this year that fell below Wall Street’s estimate, calling for only modest growth. Apple shipments drop by 10% in Q1. 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. Andria Pichidi 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.
    • The morning of my last post I happened to glance over to the side and saw “...angst over the FOMC’s rate trajectory triggered a flight to safety, hence boosting the haven demand. “   http://www.traderslaboratory.com/forums/topic/21621-hfmarkets-hfmcom-market-analysis-services/page/17/?tab=comments#comment-228522   I reacted, but didn’t take time to  respond then... will now --- HFBlogNews, I don’t know if you are simply aggregating the chosen narratives for the day or if it’s your own reporting... either way - “flight to safety”????  haven ?????  Re: “safety  - ”Those ‘solid rocks’ are getting so fragile a hit from a dandelion blowball might shatter them... like now nobody wants to buy longer term new issues at these rates...yet the financial media still follows the scripts... The imagery they pound day in and day out makes it look like the Fed knows what they’re doing to help ‘us’... They do know what they’re doing - but it certainly is not to help ‘us’... and it is not to ‘control’ inflation... And at some point in the not too distant future, the interest due will eat a huge portion of the ‘revenue’ Re: “haven” The defaults are coming ...  The US will not be the first to default... but it will certainly not be the very last to default !! ...Enough casual anti-white racism for the day  ... just sayin’
    • Date: 12th April 2024. Producer Inflation On The Rise, But Will Earnings Hold Demand Steady?     Producer inflation rose slightly less than previous expectations, but the annual figure continues to rise. The annual PPI rose to 2.1% and the Core PPI rose to 2.4%. The NASDAQ and SNP500 end the day higher, but the Dow Jones continues to struggle. This morning earnings kick off with the banking sector including JP Morgan, BlackRock and Wells Fargo. All 3 stocks trade higher during pre-trading hours. The Euro trades lower against all currencies despite the ECB’s attempt to establish a hawkish tone. USA100 – The NASDAQ Climbs Higher, But Is the Growth Sustainable? The NASDAQ was the only index which did not witness a significant decline at the opening of the US session. In addition to this, the USA100 is the only index which is witnessing indications of a bullish market. The price has crossed onto a higher high breaking the resistance level at $18,269. The index is also trading above the 75-Bar EMA and at the 65.00 level on the RSI which signals buyers are controlling the market. However, a similar large bullish impulse wave was also formed on the 3rd and 5th of the month and was followed by a correction. Therefore, investors need to be cautious of a bearish breakout which may signal a correction back to the 75-bar EMA (18,165). The medium-term growth and its sustainability will depend on the upcoming earnings data.   Bond yields declined during this morning’s Asian session by 18 points, which is positive for the stock market. However, even with the decline, bond yields remain significantly higher than Monday’s opening yield. This week the 10-year bond yield rose from 4.424 to 4.558, which is a concern. If bond yields again start to rise, the stock market potentially can again become pressured. 25% of the NASDAQ ended the day lower and 75% higher. This gives a clear indication of the sentiment towards the technology sector and reassures traders about the price movement. Another positive was all of the top 12 influential stocks rose in value. Apple, NVIDIA and Broadcom saw the strongest gains, all rising more than 4%. Producer inflation read slightly lower than expectations, however, the index continues to rise. The Producer Price Index rose from 1.6% to 2.1% and the Core PPI from 2.1% to 2.4%. Therefore, it is not indicating inflation will become easier to tackle in the upcoming months. For this reason, investors should note that inflation and the monetary policy is still a risk and can trigger strong bearish impulse waves. EURUSD – The Euro Declines Against Major Currencies The European Central Bank is attempting to concentrate on the positive factors and give no indications of when the committee may opt to cut rates. For example, President Lagarde advises “sales figures” remain stable, but the issue remains they are stably low. Officials said the decline in prices generally confirms medium-term forecasts and is ensured by a decrease in the cost of food and goods. Most experts continue to believe that the first reduction in interest rates will happen in June, and there may be three or four in total during the year. Due to this, the Euro is declining against all currencies including the Pound, Yen and Swiss Franc. The US Dollar Index on the other hand trades 0.39% higher and is almost trading at a 23-week high. Due to this momentum, the price of the exchange continues to indicate a decline in favor of the US Dollar.   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 HMarkets 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.
    • $MSFT Microsoft stock top of range breakout above 433.1, https://stockconsultant.com/?MSFT
×
×
  • Create New...

Important Information

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