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

    • PTCT PTC Therapeutics stock watch, trending with a pull back to 45.17 support area at https://stockconsultant.com/?PTCT
    • APPS Digital Turbine stock, nice rally off the 1.47 triple+ support area, from Stocks to Watch at https://stockconsultant.com/?APPS
    • Date: 20th December 2024.   BOE Sees More Support For Rate Cuts As USD Strengthens!   The US Dollar continues to rise in value after obtaining further support from positive economic and employment data. However, the hawkish Federal Reserve continues to support the currency. On the other hand, the Great British Pound comes under significant strain. Why is the GBPUSD declining? GBPUSD - Why is the GBPUSD Declining? The GBPUSD is witnessing bullish price movement for three primary reasons. The first is the Federal Reserve’s Monetary Policy, the second is the positive US news releases from yesterday and the third is the votes from the Bank of England’s Monetary Policy Committee.     Even though the Bank of England chose to keep interest rates unchanged at 4.75%, the number of votes to cut indicates dovishness in the upcoming months. Previously, traders were expecting the BoE to remain cautious due to inflation rising to 2.6% and positive employment data. In addition to this, the Retail Sales data from earlier this morning only rose 0.2%, lower than expectations adding pressure to GBP. Investors also should note that the two currencies did not conflict and price action was driven by both an increasing USD and a declining GBP. The US Dollar rose in value against all currencies, except for the Swiss Franc, against which it saw a slight decline. The GBP fell against all currencies, except for the GBPJPY, which ended higher solely due to earlier gains. US Monetary Policy and Macroeconomics The bullish price movement seen within the US Dollar Index continues to partially be due to its hawkish monetary policy. Particularly, indications from Jerome Powell that the Fed will only cut on two occasions and the first cut will take place in May. However, in addition to this the economic data from yesterday continues to illustrate a resilient and growing economy. This also supports the Fed’s approach to monetary policy and its efforts to push inflation back to the 2% target. The US GDP rose 3.1% over the past quarter beating expectations of 2.8%. The GDP rate of 3.1% is also higher than the first two quarters of 2024 (1.4% & 3.0%). In addition to this, the US Weekly Unemployment Claims fell from 242,000 to 220,000 and existing home sales rose to 4.15 million. Home sales in the latest month rose to an 8-month high. For this reason, the US Dollar rose in value against most currencies throughout the day. Analysts believe the US Dollar will continue to perform well due to less frequent rate cuts and tariffs. The US Dollar Index trades 1.65% higher this week. Bank of England Sees Increased Support for Rate Cuts! The Bank of England kept interest rates unchanged as per market’s previous expectations. The decision is determined by a committee of nine members and at least five of them must vote for a cut for the central bank to proceed. Analysts anticipated only two members voting for a cut, but three did. This signals a dovish tone and increases the likelihood of earlier rate cuts in 2025. The three members that voted for a rate cut were Dave Ramsden, Swati Dhingra, and Alan Taylor. Advocates for lower rates believe the current policy is too restrictive and risks pushing inflation well below the 2.0% target in the medium term. Meanwhile, supporters of keeping the current monetary policy argue that it's unclear if rising business costs will increase consumer prices, reduce jobs, or slow wage growth. However, if markets continue to expect a more dovish Bank of England in 2025, the GBP could come under further pressure. In 2024, the GBP was the best performing currency after the US Dollar and outperformed the Euro, Yen and Swiss Franc. This was due to the Bank of England’s reluctance to adjust rates at a similar pace to other central banks. GBPUSD - Technical Analysis In terms of the price of the exchange, most analysts believe the GBPUSD will continue to decline so long as the Federal Reserve retains their hawkish tone. The exchange rate continues to form lower swing lows and lower highs. The price trades below most moving averages on the 2-hour timeframe and below the neutral level on oscillators. On the 5-minute timeframe, the price moves back towards the 200-bar SMA, but sell signals may materialise if the price falls back below 1.24894.     Key Takeaways: The US Dollar increases in value for a third consecutive day and increases its monthly rise to 2.32%. The US Dollar Index was the best performing currency of Thursday’s session, along with the Swiss Franc. US Gross Domestic Product rises to 3.1% beating economist’s expectations of 2.8%. US Weekly Unemployment Claims read 220,000, 22,000 less than the previous week and lower than expectations. The NASDAQ declines further and trades 5.00% lower than the previous lows. The GBPUSD ends the day 0.56% lower and falls more than 1% after the Bank of England’s rate decision. Three Members of the BoE vote to cut interest rates. The GBP was the worst performing currency of the day along with the Japanese Yen. 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.
    • Date: 19th December 2024.   Federal Reserve Sparks NASDAQ’s Sharpest Selloff of 2024!   The NASDAQ fell more than 3.60% after the Federal Reserve cut interest rates, but gave hawkish comments. The stock market saw its largest decline witnessed in 2024 so far, as investors opted to cash in profits and not risk in the short-medium term. What did Chairman Powell reveal, and how does it impact the NASDAQ? The NASDAQ Falls To December Lows After Fed Guidance! The NASDAQ and US stock market in general saw a considerable decline after the press conference of the Federal Reserve. The USA100 ended the day 3.60% lower and saw only 1 of its 100 stocks avoid a decline. Of the most influential stocks the worst performers were Tesla (-8.28%), Broadcom (-6.91%) and Amazon (-4.60%).     When monitoring the broader stock market, similar conditions are seen confirming the investor sentiment is significantly lower and not solely related to the tech industry. The worst performing sectors are the housing and banking sectors. However, investors should also note that the decline was partially due to a build-up of profits over the past months. As a result, investors could easily sell and reduce exposure to cash in profits and lower their risk appetite. Analysts note that despite the Federal Reserve's hawkish stance, the Chairman provided a positive outlook. He highlighted optimism for the economy and the employment sector. Therefore, many analysts continue to believe that investors will buy the dip, even if it’s not imminent. A Hawkish Federal Reserve And Powell’s Guidance Even though traditional economics suggests a rate cut benefits the stock market, the market had already priced in the cut. As a result, the rate cut could no longer influence prices. Investors are now focusing on how the Federal Reserve plans to cut in 2025. This is what triggered the selloff and the decline. Investors were looking for indications of 3-4 rate cuts by the Federal Reserve in 2025 and for the first cut to be in March. However, analysts advise that the forward guidance by the Chairman, Jerome Powell, clearly indicates 2 rate adjustments. In addition to this, analysts believe the Fed will now cut next in May 2025. The average expectation now is that the Federal Reserve will cut 0.25% on two occasions in 2025. The Fed also advised that it is too early to know the effect of tariffs and “when the path is uncertain, you go slower”. This added to the hawkish tone of the central bank. However, surveys indicate that 15% of analysts believe the Federal Reserve will be forced into cutting rates at a faster pace. As a result, the US Dollar Index rose 1.25% and Bond Yields to a 7-month high. For investors, this makes other investment categories more attractive and stocks more expensive for foreign investors. However, the average decline the NASDAQ has seen before investors buy the dip is 13% ($19,320). This will also be a key level for investors if the NASDAQ continues to decline. NASDAQ - Technical Analysis Due to the bearish volatility, the price of the NASDAQ is trading below all major Moving Averages and Oscillators on the 2-Hour chart. After retracement the oscillators are no longer indicating an oversold price and continue to point to a bearish bias. Sell indications are likely to strengthen if the price declines below $21,222.60 in the short-term.       Key Takeaways: A hawkish Federal Reserve cut interest rates by 0.25% and indicates only 2 rate cuts in 2025! The stock market witnesses its worst day of 2024 due to the Fed’s hawkish forward guidance. Economists do not expect a rate cut before May 2025. Housing and bank stocks fell more than 4%. Investors are cashing in their gains and not looking to risk while the Fed is unlikely to cut again until May 2025. The US Dollar Index rises close to its highest level since November 2022. US Bond Yields also rise to their highest since May 2024. The NASDAQ’s average decline in 2024 before investors opt to purchase the dip is 13%. 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.
    • SNAP stock at 11.38 support area at https://stockconsultant.com/?SNAP
×
×
  • Create New...

Important Information

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