Simple Coding Help - No Promise.

Hello Seniors, I think my post gone without getting noticed #4360. I'm not sure whether we can request seniors specifically, if yes can Happy ji or Amit ji can look into the code and guide me pls ? Am desperate to get this code right... anyone pls help to get that code run n work properly (#4360). Thanks you so much ...
 
Hi Friends,

Can this strategy be coded for Amibroker AFL..

http://www.tradingsetupsrev iew.c om/2-period-adx-trend-trading-strategy/

Instead of 20 EMA we can use 17 EMA.

Thanks a lot
How will you handle cancellation of order when it is not filled?

Also, no execution engine (that I know of) for Indian markets allows for this kind of strategy.

This strategy can be coded in amibroker but it is extremely tricky to manage.
It can be done more easily in metatrader4.
 

trash

Well-Known Member
For calculating PoC we need to determine the Price at which maximum Volume was traded (or max nos of TPOs are printed) and for that similar looping structure has to be used, which has limitations as you have experienced it will not be able to draw multiple Profiles on single chart. The Amibroker sample code that I have copied above will give you multiple daily profiles on single chart without crashing but value areas and PoC have to be approximated.

But think about it, doing it manually gives us an advantage of taking into consideration confluence with few other S/R levels on the charts like Swing Pivots (PL/PHs) or floor/camarilla pivots, BRNs etc, sideways PA zones, gaps etc.

The more the confluence the better will be the level / band


Happy :)
The underlined generalizing statement (which is not referring to any code) is wrong because it makes it look like as if there would be a limitation in AmiBroker because upper quote clearly states that user can not draw multiple profiles on single chart which is absolutely wrong! Also there is no zoom out limitation or speed issue if a code is properly written.

So the actual limitation is the written user's code but nothing else!

AmiBroker just executes what you want it to process. If the code is not properly written then the famous garbage in -> garbage out steps in! The same happens in R, Matlab, ... etc.

How do I know? Because I have written many, many codes (including several profile and footprint AFLs, combined profiles, multi session profiles, including profile output in exploration, etc.) myself, several ones having thousands of lines per AFL and all properly working without any crash! You don't believe me? Then just look here at actual real examples http://www.traderji.com/amibroker/102367-amibroker-vs-ninjatrader-8.html or here http://amibrokerforum.proboards.com/thread/159/volume-price-buying-selling-volumes?page=3

So I think I know a little bit or two about how to write such AFLs and my comments are not based on theory but on reality.

And as for market profile... those AFLs that are floating around here are not the top standard of visual presentation on top of that. For example following private one http://i.imgur.com/lZs2u1E.png is showing a more professionally made AFL work. It is literally a difference as night and day comparing it. That simply is an objective fact.

So once again the limitation is the user's code.

Now as additional information and as for volume profile... AmiBroker have recently implemented a function called PriceVolDistribution() which is a function of type matrix (multi dim tables/arrays). So users/programmers have full access to any distribution value and you may further calculate/output whatever you want based on what is stored in that matrix. (And of course you can calculate/store on lower interval and process on other interval).

So these are the actual real facts contrary to generalizing wrong statements which always show up quickly when required knowledge is missing.
 
I read the discussions over coder experience vs Amibroker's limitations yesterday also. Lets don't undervalue anyone, professional's coding will be better than trader's coding.A better coder will be average trader, Awesome trader may be avg coder. But here Traderji is group of trading community helping out eachother, let it be like that.
 

wisp

Well-Known Member
I read the discussions over coder experience vs Amibroker's limitations yesterday also. Lets don't undervalue anyone, professional's coding will be better than trader's coding.A better coder will be average trader, Awesome trader may be avg coder. But here Traderji is group of trading community helping out eachother, let it be like that.
I think trash's gripe is that without licensed versions (and therefore lack of support from Amibroker , ), people are trashing Ami's capabilities without really knowing...
 

cellclinic

Well-Known Member
Hello Friends :)

Again With A Request ... I Need Prices With Lables Around The R1 R2 & S1 S2 If Possible ...

HTML:
_SECTION_BEGIN("Price");
SetChartOptions(0,chartShowArrows|chartShowDates);
_N(Title = StrFormat("{{NAME}} - {{INTERVAL}} {{DATE}} Open %g, Hi %g, Lo %g, Close %g (%.1f%%) {{VALUES}}", O, H, L, C, SelectedValue( ROC( C, 1 ) ) ));
Plot( C, "Close", ParamColor("Color", colorDefault ), styleNoTitle | ParamStyle("Style") | GetPriceStyle() ); 
_SECTION_END();

_SECTION_BEGIN("HA");

//calculates floor pivots from previous days data & plots it on the present intraday chart.
//RED LINE = RESISTANCE
//RED DASHED LINE = MINI RESISTANCE
//BLUE LINE = SUPPORT
//BLUE DASHED LINE = MINI SUPPORT
//black DOTTED LINE = PIVOT
//RED DOTTED LINE = PREVIOUS Day High
//BLUE DOTTED LINE = PREVIOUS Day Low
//BLACK DOTTED LINE = PREVIOUS Day Close


//2 - IN - 1 PRICE CHART
Pstyle = ParamToggle("Heikin Ashi","On|Off",1);
if(Pstyle==0){
HaClose = (O+H+L+C)/4;
HaOpen = AMA( Ref( HaClose, -1 ), 0.5 );
HaHigh = Max( H, Max( HaClose, HaOpen ) );
HaLow = Min( L, Min( HaClose, HaOpen ) );
PlotOHLC(HaOpen,HaHigh,HaLow,HaClose,"",IIf(HaClose >
HaOpen,colorGreen,colorBrown),styleCandle);
_N(Title = StrFormat("{{NAME}} - {{INTERVAL}} {{DATE}} Open %g, Hi %g, Lo %g,
Close %g (%.1f%%) {{VALUES}}", O, H, L, C, SelectedValue( ROC( C, 1 ) ) ));

}
else {
_N(Title = StrFormat("{{NAME}} - {{INTERVAL}} {{DATE}} Open %g, Hi %g, Lo %g,
Close %g (%.1f%%) {{VALUES}}", O, H, L, C, SelectedValue( ROC( C, 1 ) ) ));
Plot( C, "Close", ParamColor("Color", colorBlack ), styleNoTitle |
ParamStyle("Style") | GetPriceStyle() ); 
}


//TIME FRAME CALCULATION
H1 = TimeFrameGetPrice("H", inDaily, -1);		// yesterdays high
L1 = TimeFrameGetPrice("L", inDaily, -1);		//				low
C1= TimeFrameGetPrice("C", inDaily, -1);		//				close
DayO = TimeFrameGetPrice("O", inDaily);			// current day open
DayO1 = TimeFrameGetPrice("O", inDaily,-1);			// current day open


//PLOTS

Plot(H1, "",ParamColor( "PD H", colorCycle ), styleDots+styleNoRescale);
Plot(L1, "",ParamColor( "PD L", colorCycle ), styleDots);
Plot(C1, "",ParamColor( "PD C", colorCycle ), styleDots+styleLine);
Plot(DayO, "",ParamColor( "TD O", colorCycle ), styleDots);
Plot(DayO1, "",ParamColor( "PD O", colorCycle ), styleDots+styleLine);
_SECTION_END();

//Topping Bar
//Range = H - L ;
//TPB = Volume > MA(Volume,9) AND Close < Low + Range/2 AND Range <= Ref(Range,-1);
//PlotShapes(shapeSmallCircle * TPB,colorblack,0,H,20);



//Previous Days HI LO //

DayH = TimeFrameGetPrice("H", inDaily, -1);	 DayHI = LastValue (DayH,1);// yesterdays high
DayL = TimeFrameGetPrice("L", inDaily, -1);	 DayLI = LastValue (DayL,1);	// yesterdays low
DayC = TimeFrameGetPrice("C", inDaily, -1);	 	// yesterdays close
DayO = TimeFrameGetPrice("O", inDaily);			// current day open
DayH2= TimeFrameGetPrice("H", inDaily, -2);  DayH2I = LastValue (DayH2,1); // Two days before high
DayL2= TimeFrameGetPrice("L", inDaily, -2);  DayL2I = LastValue (DayL2,1);  // Two days before low
DayH3= TimeFrameGetPrice("H", inDaily, -3);  DayH3I = LastValue (DayH3,1);  // Three days before high
DayL3= TimeFrameGetPrice("L", inDaily, -3);  DayL3I = LastValue (DayL3,1);  // Three days before low

numbars = LastValue(Cum(Status("barvisible")));
hts  = -33.5;

YHL = ParamToggle("Yesterday HI LO","Show|Hide",1);
if(YHL==1) {
  Plot(DayL,"YL",colorRed,styleDots|styleNoLine|styleNoRescale|styleNoTitle);
  Plot(DayH,"YH",colorBrightGreen,styleDots|styleNoLine|styleNoRescale|styleNoTitle);
  PlotText(" YH " , 	LastValue(BarIndex())-(numbars/Hts), DayHI, colorTurquoise);
  PlotText(" YL " , 	LastValue(BarIndex())-(numbars/Hts), DayLI, colorTurquoise);
}

TDBHL = ParamToggle("2/3Days before HI LO","Show|Hide",0);
if(TDBHL==1) {
  Plot(DayL2,"2DBL",colorTurquoise,styleDots|styleNoLine|styleNoRescale|styleNoTitle);
  Plot(DayH2,"2DBH",colorTurquoise,styleDots|styleNoLine|styleNoRescale|styleNoTitle);
  Plot(DayL3,"3DBL",colorTurquoise,styleDots|styleNoLine|styleNoRescale|styleNoTitle);
  Plot(DayH3,"3DBH",colorTurquoise,styleDots|styleNoLine|styleNoRescale|styleNoTitle);
  PlotText(" 2DBH " , 	LastValue(BarIndex())-(numbars/Hts), DayH2I, colorTurquoise);
  PlotText(" 2DBL " , 	LastValue(BarIndex())-(numbars/Hts), DayL2I, colorTurquoise);
  PlotText(" 3DBH " , 	LastValue(BarIndex())-(numbars/Hts), DayH3I, colorTurquoise);
  PlotText(" 3DBL " , 	LastValue(BarIndex())-(numbars/Hts), DayL3I, colorTurquoise);
}




rg = (DayH - DayL);

H5=DayC+1.1*rg;     H5I = LastValue (H5,1);
H4=DayC+1.1*rg/2;   H4I = LastValue (H4,1);
H3=DayC+1.1*rg/4;   H3I = LastValue (H3,1);
H2=DayC+1.1*rg/6;   H2I = LastValue (H2,1);
H1=DayC+1.1*rg/12;  H1I = LastValue (H1,1);
L1=DayC-1.1*rg/12;  L1I = LastValue (L1,1);
L2=DayC-1.1*rg/6;   L2I = LastValue (L2,1);
L3=DayC-1.1*rg/4;   L3I = LastValue (L3,1);
L4=DayC-1.1*rg/2;   L4I = LastValue (L4,1);
L5=DayC-1.1*rg;     L5I = LastValue (L5,1);



THL = ParamToggle("Todays Hi Lo","Show|Hide",1);
if(THL==1)  {
  isRth = TimeNum() >= 084500 & TimeNum() <= 085959;
  isdRth = TimeNum() >= 084500 & TimeNum() <= 160000;
  aRthL = IIf(isRth, L, 1000000);
  aRthH = IIf(isdRth, H, Null);
  aRthLd = IIf(isdRth, L, 1000000);
  DayH = TimeFrameCompress( aRthH, inDaily, compressHigh );
  DayH = TimeFrameExpand( DayH, inDaily, expandFirst );
  DayL = TimeFrameCompress( aRthLd, inDaily, compressLow );
  DayL = TimeFrameExpand( DayL, inDaily, expandFirst );
  Bars = BarsSince(TimeNum() >= 94500 AND TimeNum() < 095959);//,BarIndex(),1); // AND DateNum()==LastValue(DateNum());
  x0 = BarCount-LastValue(Bars);
  x1 = BarCount-1;
  DayHline=LineArray(x0,LastValue(DayH),x1,LastValue (DayH),0); 
  DayLline=LineArray(x0,LastValue(DayL),x1,LastValue (DayL),0); 
  DayHlineI = LastValue (DayHline,1);
  DayLlineI = LastValue (DayLline,1);
  Plot(DayHline,"DayH",colorBlack,styleBar|styleNoRescale|styleNoTitle);
  Plot(DayLline,"DayL",colorBlack,styleBar|styleNoRescale|styleNoTitle);
  PlotText(" Day Hi " , 	LastValue(BarIndex())-(numbars/Hts), DayHlineI  +0.05, colorBlack);
  PlotText(" Day Lo " , 	LastValue(BarIndex())-(numbars/Hts), DayLlineI  +0.05, colorBlack);
 }


_SECTION_BEGIN("Price");
SetChartOptions(0,chartShowArrows|chartShowDates);
_N(Title = StrFormat("{{NAME}} - {{INTERVAL}} {{DATE}} Open %g, Hi %g, Lo %g, Close %g (%.1f%%) {{VALUES}}", O, H, L, C, SelectedValue( ROC( C, 1 ) ) ));
Plot( C, "Close", ParamColor("Color", colorDefault ), styleNoTitle | ParamStyle("Style") | GetPriceStyle() ); 
_SECTION_END();

_SECTION_BEGIN("HA");

//calculates floor pivots from previous days data & plots it on the present intraday chart.
//RED LINE = RESISTANCE
//RED DASHED LINE = MINI RESISTANCE
//BLUE LINE = SUPPORT
//BLUE DASHED LINE = MINI SUPPORT
//black DOTTED LINE = PIVOT
//RED DOTTED LINE = PREVIOUS Day High
//BLUE DOTTED LINE = PREVIOUS Day Low
//BLACK DOTTED LINE = PREVIOUS Day Close


//2 - IN - 1 PRICE CHART
Pstyle = ParamToggle("Heikin Ashi","On|Off",1);
if(Pstyle==0){
HaClose = (O+H+L+C)/4;
HaOpen = AMA( Ref( HaClose, -1 ), 0.5 );
HaHigh = Max( H, Max( HaClose, HaOpen ) );
HaLow = Min( L, Min( HaClose, HaOpen ) );
PlotOHLC(HaOpen,HaHigh,HaLow,HaClose,"",IIf(HaClose >
HaOpen,colorGreen,colorBrown),styleCandle);
_N(Title = StrFormat("{{NAME}} - {{INTERVAL}} {{DATE}} Open %g, Hi %g, Lo %g,
Close %g (%.1f%%) {{VALUES}}", O, H, L, C, SelectedValue( ROC( C, 1 ) ) ));

}
else {
_N(Title = StrFormat("{{NAME}} - {{INTERVAL}} {{DATE}} Open %g, Hi %g, Lo %g,
Close %g (%.1f%%) {{VALUES}}", O, H, L, C, SelectedValue( ROC( C, 1 ) ) ));
Plot( C, "Close", ParamColor("Color", colorBlack ), styleNoTitle |
ParamStyle("Style") | GetPriceStyle() ); 
}


//TIME FRAME CALCULATION
H1 = TimeFrameGetPrice("H", inDaily, -1);		// yesterdays high
L1 = TimeFrameGetPrice("L", inDaily, -1);		//				low
C1= TimeFrameGetPrice("C", inDaily, -1);		//				close
DayO = TimeFrameGetPrice("O", inDaily);			// current day open
DayO1 = TimeFrameGetPrice("O", inDaily,-1);			// current day open


//PLOTS

Plot(H1, "",ParamColor( "PD H", colorCycle ), styleDots+styleNoRescale);
Plot(L1, "",ParamColor( "PD L", colorCycle ), styleDots);
Plot(C1, "",ParamColor( "PD C", colorCycle ), styleDots+styleLine);
Plot(DayO, "",ParamColor( "TD O", colorCycle ), styleDots);
Plot(DayO1, "",ParamColor( "PD O", colorCycle ), styleDots+styleLine);
_SECTION_END();

//Topping Bar
//Range = H - L ;
//TPB = Volume > MA(Volume,9) AND Close < Low + Range/2 AND Range <= Ref(Range,-1);
//PlotShapes(shapeSmallCircle * TPB,colorblack,0,H,20);



//Previous Days HI LO //

DayH = TimeFrameGetPrice("H", inDaily, -1);	 DayHI = LastValue (DayH,1);// yesterdays high
DayL = TimeFrameGetPrice("L", inDaily, -1);	 DayLI = LastValue (DayL,1);	// yesterdays low
DayC = TimeFrameGetPrice("C", inDaily, -1);	 	// yesterdays close
DayO = TimeFrameGetPrice("O", inDaily);			// current day open
DayH2= TimeFrameGetPrice("H", inDaily, -2);  DayH2I = LastValue (DayH2,1); // Two days before high
DayL2= TimeFrameGetPrice("L", inDaily, -2);  DayL2I = LastValue (DayL2,1);  // Two days before low
DayH3= TimeFrameGetPrice("H", inDaily, -3);  DayH3I = LastValue (DayH3,1);  // Three days before high
DayL3= TimeFrameGetPrice("L", inDaily, -3);  DayL3I = LastValue (DayL3,1);  // Three days before low

numbars = LastValue(Cum(Status("barvisible")));
hts  = -33.5;

YHL = ParamToggle("Yesterday HI LO","Show|Hide",1);
if(YHL==1) {
  Plot(DayL,"YL",colorRed,styleDots|styleNoLine|styleNoRescale|styleNoTitle);
  Plot(DayH,"YH",colorBrightGreen,styleDots|styleNoLine|styleNoRescale|styleNoTitle);
  PlotText(" YH " , 	LastValue(BarIndex())-(numbars/Hts), DayHI, colorTurquoise);
  PlotText(" YL " , 	LastValue(BarIndex())-(numbars/Hts), DayLI, colorTurquoise);
}

TDBHL = ParamToggle("2/3Days before HI LO","Show|Hide",0);
if(TDBHL==1) {
  Plot(DayL2,"2DBL",colorTurquoise,styleDots|styleNoLine|styleNoRescale|styleNoTitle);
  Plot(DayH2,"2DBH",colorTurquoise,styleDots|styleNoLine|styleNoRescale|styleNoTitle);
  Plot(DayL3,"3DBL",colorTurquoise,styleDots|styleNoLine|styleNoRescale|styleNoTitle);
  Plot(DayH3,"3DBH",colorTurquoise,styleDots|styleNoLine|styleNoRescale|styleNoTitle);
  PlotText(" 2DBH " , 	LastValue(BarIndex())-(numbars/Hts), DayH2I, colorTurquoise);
  PlotText(" 2DBL " , 	LastValue(BarIndex())-(numbars/Hts), DayL2I, colorTurquoise);
  PlotText(" 3DBH " , 	LastValue(BarIndex())-(numbars/Hts), DayH3I, colorTurquoise);
  PlotText(" 3DBL " , 	LastValue(BarIndex())-(numbars/Hts), DayL3I, colorTurquoise);
}




rg = (DayH - DayL);

H5=DayC+1.1*rg;     H5I = LastValue (H5,1);
H4=DayC+1.1*rg/2;   H4I = LastValue (H4,1);
H3=DayC+1.1*rg/4;   H3I = LastValue (H3,1);
H2=DayC+1.1*rg/6;   H2I = LastValue (H2,1);
H1=DayC+1.1*rg/12;  H1I = LastValue (H1,1);
L1=DayC-1.1*rg/12;  L1I = LastValue (L1,1);
L2=DayC-1.1*rg/6;   L2I = LastValue (L2,1);
L3=DayC-1.1*rg/4;   L3I = LastValue (L3,1);
L4=DayC-1.1*rg/2;   L4I = LastValue (L4,1);
L5=DayC-1.1*rg;     L5I = LastValue (L5,1);

PP = (DayL + DayH + DayC)/3;  PPI = LastValue (PP,1);   // Pivot
R1  =  (PP * 2) - DayL;       R1I = LastValue (R1,1);   // Resistance 1
S1  =  (PP * 2)  - DayH;      S1I = LastValue (S1,1);   // Support 1
R2  =  PP + R1 - S1;          R2I = LastValue (R2,1);   // Resistance 2
S2  =  PP - R1 + S1;          S2I = LastValue (S2,1);   // Support 2
R3  =  PP + R2 - S1;          R3I = LastValue (R3,1);   // Resistance 3
S3  =  PP - R2 + S1;          S3I = LastValue (S3,1);   // Support 3

ppl = ParamToggle("Pivot Levels","Show|Hide",1);
if(ppl==1)  {
  Plot(PP, "PP",colorDarkGrey,styleDots|styleNoLine|styleNoRescale|styleNoTitle);
  Plot(R1, "R1",colorViolet,styleDots|styleNoLine|styleNoRescale|styleNoTitle);
  Plot(S1, "S1",colorViolet,styleDots|styleNoLine|styleNoRescale|styleNoTitle);
  Plot(R2, "R2",colorViolet,styleDots|styleNoLine|styleNoRescale|styleNoTitle);
  Plot(S2, "S2",colorViolet,styleDots|styleNoLine|styleNoRescale|styleNoTitle);
  Plot(R3, "R3",colorViolet,styleDots|styleNoLine|styleNoRescale|styleNoTitle);
  Plot(S3, "S3",colorViolet,styleDots|styleNoLine|styleNoRescale|styleNoTitle);

  PlotText(" Pivot ",  LastValue(BarIndex())-(numbars/Hts), PPI, colorDarkGrey);
  PlotText(" R1 " ,    LastValue(BarIndex())-(numbars/Hts), R1I, colorViolet);
  PlotText(" S1 " ,    LastValue(BarIndex())-(numbars/Hts), S1I, colorViolet);
  PlotText(" R2 " ,    LastValue(BarIndex())-(numbars/Hts), R2I, colorViolet);
  PlotText(" S2 " ,    LastValue(BarIndex())-(numbars/Hts), S2I, colorViolet);
  PlotText(" R3 " ,    LastValue(BarIndex())-(numbars/Hts), R3I, colorViolet);
  PlotText(" S3 " ,    LastValue(BarIndex())-(numbars/Hts), S3I, colorViolet);
}


rg = (DayH - DayL);

H5=DayC+1.1*rg;     H5I = LastValue (H5,1);
H4=DayC+1.1*rg/2;   H4I = LastValue (H4,1);
H3=DayC+1.1*rg/4;   H3I = LastValue (H3,1);
H2=DayC+1.1*rg/6;   H2I = LastValue (H2,1);
H1=DayC+1.1*rg/12;  H1I = LastValue (H1,1);
L1=DayC-1.1*rg/12;  L1I = LastValue (L1,1);
L2=DayC-1.1*rg/6;   L2I = LastValue (L2,1);
L3=DayC-1.1*rg/4;   L3I = LastValue (L3,1);
L4=DayC-1.1*rg/2;   L4I = LastValue (L4,1);
L5=DayC-1.1*rg;     L5I = LastValue (L5,1);

pcl = ParamToggle("Camerilla Levels","Show|Hide",0);
if(pcl==1)  {
   Plot(H5,"",colorRose,styleDots|styleNoLine|styleNoRescale|styleNoTitle);
   Plot(H4,"",colorRose,styleDots|styleNoLine|styleNoRescale|styleNoTitle);
   Plot(H3,"",colorRose,styleDots|styleNoLine|styleNoRescale|styleNoTitle);
   Plot(H2,"",colorRose,styleDots|styleNoLine|styleNoRescale|styleNoTitle);
   Plot(H1,"",colorRose,styleDots|styleNoLine|styleNoRescale|styleNoTitle);
   Plot(L1,"",colorRose,styleDots|styleNoLine|styleNoRescale|styleNoTitle);
   Plot(L2,"",colorRose,styleDots|styleNoLine|styleNoRescale|styleNoTitle);
   Plot(L3,"",colorRose,styleDots|styleNoLine|styleNoRescale|styleNoTitle);
   Plot(L4,"",colorRose,styleDots|styleNoLine|styleNoRescale|styleNoTitle);
   Plot(L5,"",colorRose,styleDots|styleNoLine|styleNoRescale|styleNoTitle);
   PlotText(" H5 = " , 	LastValue(BarIndex())-(numbars/Hts), H5I  +0.05, colorCustom11);
   PlotText(" H4 = " , 	LastValue(BarIndex())-(numbars/Hts), H4I  +0.05, colorCustom11);
   PlotText(" H3 = " , 	LastValue(BarIndex())-(numbars/Hts), H3I  +0.05, colorCustom11);
   PlotText(" H2 = " , 	LastValue(BarIndex())-(numbars/Hts), H2I  +0.05, colorCustom11);
   PlotText(" H1 = " , 	LastValue(BarIndex())-(numbars/Hts), H1I  +0.05, colorCustom11);
   PlotText(" L1 = " , 	LastValue(BarIndex())-(numbars/Hts), L1I  +0.05, colorCustom12);
   PlotText(" L2 = " , 	LastValue(BarIndex())-(numbars/Hts), L2I  +0.05, colorCustom12);
   PlotText(" L3 = " , 	LastValue(BarIndex())-(numbars/Hts), L3I  +0.05, colorCustom12);
   PlotText(" L4 = " , 	LastValue(BarIndex())-(numbars/Hts), L4I  +0.05, colorCustom12);
   PlotText(" L5 = " , 	LastValue(BarIndex())-(numbars/Hts), L5I  +0.05, colorCustom12);
}


THL = ParamToggle("Todays Hi Lo","Show|Hide",1);
if(THL==1)  {
  isRth = TimeNum() >= 084500 & TimeNum() <= 085959;
  isdRth = TimeNum() >= 084500 & TimeNum() <= 160000;
  aRthL = IIf(isRth, L, 1000000);
  aRthH = IIf(isdRth, H, Null);
  aRthLd = IIf(isdRth, L, 1000000);
  DayH = TimeFrameCompress( aRthH, inDaily, compressHigh );
  DayH = TimeFrameExpand( DayH, inDaily, expandFirst );
  DayL = TimeFrameCompress( aRthLd, inDaily, compressLow );
  DayL = TimeFrameExpand( DayL, inDaily, expandFirst );
  Bars = BarsSince(TimeNum() >= 94500 AND TimeNum() < 095959);//,BarIndex(),1); // AND DateNum()==LastValue(DateNum());
  x0 = BarCount-LastValue(Bars);
  x1 = BarCount-1;
  DayHline=LineArray(x0,LastValue(DayH),x1,LastValue (DayH),0); 
  DayLline=LineArray(x0,LastValue(DayL),x1,LastValue (DayL),0); 
  DayHlineI = LastValue (DayHline,1);
  DayLlineI = LastValue (DayLline,1);
  Plot(DayHline,"DayH",colorBlack,styleBar|styleNoRescale|styleNoTitle);
  Plot(DayLline,"DayL",colorBlack,styleBar|styleNoRescale|styleNoTitle);
  PlotText(" Day Hi " , 	LastValue(BarIndex())-(numbars/Hts), DayHlineI  +0.05, colorBlack);
  PlotText(" Day Lo " , 	LastValue(BarIndex())-(numbars/Hts), DayLlineI  +0.05, colorBlack);
 }

_SECTION_BEGIN("Price");
SetChartOptions(0,chartShowArrows|chartShowDates);
_N(Title = StrFormat("{{NAME}} - {{INTERVAL}} {{DATE}} Open %g, Hi %g, Lo %g, Close %g (%.1f%%) {{VALUES}}", O, H, L, C, SelectedValue( ROC( C, 1 ) ) ));
PlotOHLC( O,H,L,C, "Close", ParamColor("Color", colorDefault ),styleBar ,Null,Null,0,-1,2 ); 
Plot( C, "Close", ParamColor("Color", colorDefault ), styleNoTitle | ParamStyle("Style") | GetPriceStyle(),Null,Null,0,0,2 ); 
_SECTION_END();
 

Attachments

Last edited:

trash

Well-Known Member
I think trash's gripe is that without licensed versions (and therefore lack of support from Amibroker , ), people are trashing Ami's capabilities without really knowing...
You're laying words in my mouth that are simple incorrect. There is no gripe and there is nothing that got anything to do with versions.

What I'm trying to point out is that if someone doesn't know better and the same one (it doesn't matter who it is. I'm not referring to any specific one) knows that he isn't sure then why making claims that look like being the one and only truths while in reality they are not.

You should actually thank me that I'm clearing up the dust here once in a while because otherwise the same wrong chit-chat stories would show up over and over again.

It is about facts but not about who is better and who is not. It is about professionalism (which is clearly lacking here). Part of professionalism is backing up claims to be bullet proof. (As aside it is needless to say that also part of professionalism is to not to steal. Everything else is kiddy stuff proving to be a unprofessional loser.)
 

wisp

Well-Known Member
You're laying words in my mouth that are simple incorrect. There is no gripe and there is nothing that got anything to do with versions.

What I'm trying to point out is that if someone doesn't know better and the same one (it doesn't matter who it is. I'm not referring to any specific one) knows that he isn't sure then why making claims that look like being the one and only truths while in reality they are not.

You should actually thank me that I'm clearing up the dust here once in a while because otherwise the same wrong chit-chat stories would show up over and over again.

It is about facts but not about who is better and who is not. It is about professionalism (which is clearly lacking here). Part of professionalism is backing up claims to be bullet proof. (As aside it is needless to say that also part of professionalism is to not to steal. Everything else is kiddy stuff proving to be a unprofessional loser.)

Who made you keeper of professionalism in Amibroker coding???

Like I said earlier, perhaps it all boils down to forum competition, sigh! Sorry I thought there was more to your posts than that!
 
Last edited:

Similar threads