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

    • Method of analysis: Locked-in Range Analysis Period: 10 January - 15 January Currency futures: Euro FX, Japanese Yen, British Pound, Australian Dollar, Canadian Dollar, Swiss Franc, New Zealand Dollar * A maximum potential profit of the Gravitation Locked-in Range
    • re our ‘money’ Howard Wang
    • Date : 13th January 2021. FX Update – January 13 – USD & Yields stall their run, Politics swirls. FX News Today USD reversed its 5 day run as Yields stalled too. House vote tonight to impeach President Trump, (YouTube have banned him for 7 days), Pence will not initiate the 25th Amendment to remove him. The symbolism is significant, no President has ever been impeached twice. Equities flat too (UBER +7.24%,TSLA +4.72%, FB -2.24%, GooGL & NFLX -1.00%) Asian markets also flat. GBP rallied after Bailey pushed back on Negative Interest Rates. Oil rallied over 1% after surprise inventory drawdowns peaked at $53.90, AUD pegged by possible RBA “push back” to strong AUD. Gold recovered $1850.China reported its largest daily new COVID-19 cases in 5 months.USDIndex – Back under 90.00 from rejection of 90.50 yesterday. Trades at 89.95 just over S3 – PP 90.40 – S3 89.90, S2 90.07EUR – Recovered back over 1.2200 (R2) – Trades at 1.2215 now– PP – 1.2157. R3 1.2225 –JPY – Reverses under 104.000 – after rejection 104.50 on Monday. – Trades at 103.68 (200hr MA). – PP 103.90, S1 103.55GBP – Big rally – spurred by USD weakness and Governor Bailey pushing back on Negative Interest Rates. Breached 1.3600 after multiple attempts – rallied to 1.3690 – PP 1.3585, R1 1.3668, R2 1.3715AUD – Over 0.7700 yesterday to test 0.7770 (R2) now. R1 0.7748 – NZD – Over 0.7200 yesterday to test 0.7240 (R3) now. r2 0.7215 CAD – back to test 1.2700 (S2) today as Oil rises – S1 1.2725, S3 1.2664 from Friday CHF – Trades back to 0.8850 (200hrMA) and under S3 (0.8865)- PP 0.8900 BTC – Back to around $34,600. – PP today 34,500, r1 36,600, s1 32,800GOLD – Recovers over 1850 (PP) – Trades at 1860 (R1) – R2 1875, PP 1840 USOil – New 11-mth high $53.90 (R2) after surprise drawdown in private inventories (EIA data later). R3 $54.70, r1 53.55.USA500 – Closed up 1.5 (+0.04%) 3800 – USA500 FUTS now at 3808. 48 days north of 20SMA (3740).Today – EZ industrial production, US CPI, ECB’s Lagarde, Fed’s Bullard, Brainard, Harker, Clarida Biggest (FX) Mover @ (07:30 GMT) GBPAUD (+0.23%) 5th day higher – Bounced from 200MA on open, testing 1.7625 now, key resistance 1.7650. Fast MAs aligned and trending higher, RSI 59 and rising, MACD histogram & signal line aligned higher and north of 0 line from Monday open, Stochastics rising to OB. H1 ATR 0.023, Daily ATR 0.0125.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 HotForex 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. Stuart Cowell Head Market Analyst HotForex 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.
    • XRPUSD Is Ranging Within $0.28 and $0.21 Levels, Awaiting a Breakout XRP/USD Market January 06 An increase in the bears’ pressure may penetrate the $0.21 level; the price may decrease further to $0.17 and $0.10. In case the support level of $0.21 holds, the price may reverse and the resistance levels of $0.28, $0.39, and $0.49 may be tested. Key Levels: Resistance levels: $0.28, $0.39, $0.49 Support levels: $0.21, $0.17, $0.10 XRP/USD Long-term Trend: Ranging XRPUSD is on the ranging mode in the daily chart. The coin is range-bound within the resistance level of $0.28 and the support level of $0.21.  XRPUSD started the ranging movement on December 30. The bears made an attempt to break down the support level of $0.21 failed due to low bearish momentum. Today, the bears try to penetrate the resistance level of $0.28 but the level holds and the price could not break it up. Ranging movement will continue until there is a breakout. XRPUSD Daily chart, January 06 XRPUSD is struggling to breakout at the two key levels but the levels hold the price. An increase in the bears’ pressure may penetrate the $0.21 level; the price may decrease further to $0.17 and $0.10. In case the support level of $0.21 holds, the price may reverse and the resistance levels of $0.28, $0.39, and $0.49 may be tested. However, the price retains its trading below 9 periods EMA and the 21 periods EMA, the former is below the later. The relative strength index period 14 is at 25 levels bending up to indicate a buy signal. XRP/USD Medium-term Trend: Ranging On the medium-term outlook, XRPUSD remains in the ranging mode. The bears’ momentum and the bulls’ momentum are at equilibrium within the $0.28 and $0.21 levels. The support level of $0.21 is resisting the bears. The bears lose their momentum and the bulls’ pressure is equally weak. The price results in consolidation within $0.28 and $0.21 price levels. XRPUSD 4 hour chart, January 06 The fast-moving average is interlocked with the slow-moving average. The price is hovering over the 9 periods EMA and 21 periods EMA which indicates that consolidation is ongoing. However, the relative strength index period 14 is bending up at 60 levels to indicate a buy signal.   Source: https://learn2.trade                   
    • Litecoin (LTC) Resumes Upward Move as Bulls Buy the Dips Key Highlights Litecoin slumps to $121 low and resumes upward The altcoin will further decline to $73 if the support at $120 cracks Litecoin (LTC) Current Statistics The current price: $144.63 Market Capitalization: $9,613,048,370 Trading Volume: $12,189,426,086 Major supply zones: $120, $140, $160 Major demand zones: $90, $70, $50 Litecoin (LTC) Price Analysis January 12, 2021 Litecoin has fallen to $120 low as the coin resumed its upward move. The crypto has fallen into the previous range bound zone of $120 and $140. LTC will retest the $180 resistance if the bulls clear the $140 and $170 minor resistance levels. On January 10, Litecoin was repelled as the bulls attempt to break the $180 resistance level. Meanwhile, the crypto has resumed upside momentum as the market reaches the high of $146. LTC/USD – Daily Chart Litecoin (LTC) Technical Indicators Reading After the breakdown, the LTC price broke above the SMAs which suggested an upward movement of the coin. The crypto is at level 51 of the Relative Strength Index period 14. It indicates that there is a balance between supply and demand. LTC/USD – 4 Hour Chart Conclusion Litecoin has fallen to $120 low as the current support holds. This has propelled the price to rise on the upside. However, if the $120 support fails to hold, the Fibonacci tool price prediction will hold. On January 11 downtrend; a retraced candle body tested the 61.8%Fibonacci retracement level. The retracement indicates that the crypto will reach level 1.618 Fibonacci extensions or the high of $67.40.     Source: https://learn2.trade                   
×
×
  • Create New...

Important Information

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