Simple Coding Help - No Promise.

john302928

Well-Known Member
Hi Could you please let me know how to sort watchlist on ascending /descending order, in amibroker?
I have created several watchlists with the name say watch 1,watch 4, watch5, watch 2 etc, I want sort these watchlists based on their names?

Thank you
 
hi all,

there is an afl somewhere in the traderji forum which gives numbers to current day candles.
can anybody please share it i am not able to find it.
i think its coded by pratap.
kindly help.

regds,s
 

john302928

Well-Known Member
Can anyone please explain the below syntex. What does it do and how to read it.

X = Sum( Buy, period = 2 ) == 1;
 
hi all,

there is an afl somewhere in the traderji forum which gives numbers to current day candles.
can anybody please share it i am not able to find it.
i think its coded by pratap.
kindly help.

regds,s
Code:
_SECTION_BEGIN("Bar Count");
// Author: Pratap Balakrishnan
// Copyright: All rights reserved. Not to be circulated or shared or posted on websites without the author's written permission.
// email id: [email protected]
//
// mode Text - show the barcount as a number above/below the price bars
//             every n bars as set
// mode Histogram- shows the barcount as an histogam. Best used on a different pane
//

showhisto = ParamToggle("Mode", "Text|Histogram", 0) ;
everyn = Param("Show Text Every N bars", 5, 1, 10000, 1) ;
showabove = ParamToggle("Show Pos", "Below|Above", 0) ;
Clrtext = ParamColor("Text Color", colorBlack) ;

nd = Day()!=Ref(Day(),-1) ;

nbar = 1+BarsSince(nd) ;

if (showhisto)
	Plot(nbar, "Day Bar Count", colorBlue, styleHistogram) ;
else
{
	bi = BarIndex() ;

	showtextbar = ((nbar -1) % everyn) == 0 ;
	if (showabove)
	{
		pos = H ;
		Offset = 3 ;
	}
	else
	{
		pos = L ;
		Offset = -3;
	}

	Visfirst = FirstVisibleValue(bi) ;
	Vislast = LastVisibleValue(bi) ;

	for (i = Visfirst; i <= Vislast ; i++)
	{
		if (showtextbar[i])
		{
			str = NumToStr(nbar[i], 1.0) ;
			PlotText(str, i, pos[i]+Offset, Clrtext) ;
		}
	}
//	PlotShapes(showtextbar*shapeSmallCircle, colorBlue, 0, H, 12) ;

}
_SECTION_END();
:thumb::thumb::thumb:
 

john302928

Well-Known Member
Small query in "Add column"
Below is the code to filter goldencross and death cross. Here "AddColumn (Close,"Close");" produces closing price on crossover happened. How to show current bar closing price in the result column

MA50=MA(Close,50);
MA200=MA(Close,200);
Buy=Cross(MA50,MA200);
Sell=Cross(MA200,MA50);
Filter =Buy OR Sell;
AddColumn (Buy,"Golden crossover");
AddColumn (Sell,"Death Crossover");
AddColumn (Close,"Close");
 
Hello Experts/Seniors,

Below AFL is to find BUY/SELL Volume with in the same BAR. I picked This AFL from Traderji only:lol::lol:.


PHP:
SetBarsRequired(sbrAll,sbrAll);
 
// BUYING VOLUME AND SELLING VOLUME //
 
BV = IIf( (H==L), 0, V*(C-L)/(H-L) );
SV = IIf( (H==L), 0, V*(H-C)/(H-L) );
 
PlotOHLC(SV,SV,0,0,"SellVolume",colorRed,styleCandle|styleNoTitle|styleNoLabel );
PlotOHLC(SV,BV+SV,SV,BV+SV,"BuyVolume",colorbrightgreen ,styleCandle|styleNoTitle|styleNoLabel );
 
Va = MA(V,30);
 
PlotOHLC( Va, Va, 0, 0, "", ColorBlend( colorWhite , GetChartBkColor(), 0.4 ), styleNoLabel | styleCloud | styleNoRescale, Null, Null, Null, -1 );
Plot(Va,"Average Volume",colorRose,styleNoLine|styleNoLabel );
 
VI = V/Va;
 
Title = "SellVolume:"+WriteVal(SV,5.0)+"   "+"BuyVolume:"+WriteVal(BV,5.0)+"   "+"VolumeIndex:"+WriteVal(VI,1.2)+"   "+
"BuyVolume:"+WriteVal(100*BV/(BV+SV),2.0)+"%"+"   "+"SellVolume:"+WriteVal(100*SV/(BV+SV),2.0)+"%";
Is there any way we can SUM/AVG last 3 bar Volume of BUY/SELL separately excluding Current Running Candle.

Thanks in Advance.:clap::clap:
 
help required

Dear Happy Sir
help req for following condition


cond 1 = 2 nd candle open is greater then 1st candle close
cond 2 = 2 nd candle open is less then 1st candle high

cond 3 = 2 nd candle close is greater then 1st candle close
cond 4 = 2 nd candle close is less then 1st candle high

cond 4 = 3 rd candle open is greater then 2nd candle close
cond 5 = 3 rd candle open is less then 2nd candle high

cond 6 = 3 rd candle close is gretter then 2nd candle close
cond 7 = 3 rd candle close is less then 2nd candle high

COND 8 = 4 rt candle sell signal chart is given bellow
 

Similar threads