Successes and Failures are Parts of Trading. They are Not Permanent.

image host
AMIBROKER AFL CODE
#11
...lagyan nyo naman ng finished outcome na picture boys Big Grin para mas ma-appreciate
Facebook Link to our 2017 SMP Charity Pictures https://www.facebook.com/SMPBack2School2017/
Thanks To ALL Donors, Bawiin Naman Natin sa Profits
Reply
image host
#12
Let's add 1 more line of code sa sample ni ippfx para ma-appreciate Big Grin

Steps:
1. Modify existing price code.
2. Add the code of ippfx at the end of price code.
3. Add this line at the end of step #2
_N(Title = Title + StrFormat(", Board Lot %g, One Tick %g",Boardlot(), OneTick()));
4. It should add - Board Lot ???, One Tick ??? - on the chart title.
(underlined by red line in the attached sample chart)

*Forgive my sample chart kasi hangang February lang yung uploaded data Big Grin

Here's the sample code:
Code:
_SECTION_BEGIN("Price");
//Default price code
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", colorBlack ), styleNoTitle | ParamStyle("Style") | GetPriceStyle() );

// Code by ippfx
// PSE Board Lot and Minimum Fluctuation Table
function BoardLot() {
CurrentPrice = Close[BarCount-1];
result = 0;
if (CurrentPrice >= 0.0001 AND CurrentPrice <= 0.0099)    result = 1000000;
if (CurrentPrice >= 0.0100 AND CurrentPrice <= 0.0490)    result = 100000;
if (CurrentPrice >= 0.0500 AND CurrentPrice <= 0.4950)    result = 10000;
if (CurrentPrice >= 0.5000 AND CurrentPrice <= 4.9900)    result = 1000;
if (CurrentPrice >= 5.0000 AND CurrentPrice <= 49.9500)    result = 100;
if (CurrentPrice >= 50.0000 AND CurrentPrice <= 999.5000)    result = 10;
if (CurrentPrice >= 1000.0000)     result = 5;
return result;
}

function OneTick() {
CurrentPrice = Close[BarCount-1];
result = 0;
if (CurrentPrice >= 0.0001 AND CurrentPrice <= 0.0099)    result = 0.0002;
if (CurrentPrice >= 0.0100 AND CurrentPrice <= 0.2490)    result = 0.0010;
if (CurrentPrice >= 0.2500 AND CurrentPrice <= 0.4950)    result = 0.0050;
if (CurrentPrice >= 0.5000 AND CurrentPrice <= 9.9900)    result = 0.0100;
if (CurrentPrice >= 10.0000 AND CurrentPrice <= 19.9800)    result = 0.0200;
if (CurrentPrice >= 20.0000 AND CurrentPrice <= 99.9500)    result = 0.0500;
if (CurrentPrice >= 100.0000 AND CurrentPrice <= 199.9000)    result = 0.1000;
if (CurrentPrice >= 200.0000 AND CurrentPrice <= 499.8000)    result = 0.2000;
if (CurrentPrice >= 500.0000 AND CurrentPrice <= 999.5000)    result = 0.5000;
if (CurrentPrice >= 1000.0000 AND CurrentPrice <= 1999.0000)    result = 1.0000;
if (CurrentPrice >= 2000.0000 AND CurrentPrice <= 4998.0000)    result = 2.0000;
if (CurrentPrice >= 5000.0000)     result = 5.0000;
return result;
}

//added code by m0m
_N(Title = Title + StrFormat(", Board Lot %g, One Tick %g",Boardlot(), OneTick()));

_SECTION_END();


Sample chart result
[Image: pricewithboardlot.png]
Reply
#13
...galing! Big Grin dami talaga techie dito smp hehe Smile +1rep m0m
Facebook Link to our 2017 SMP Charity Pictures https://www.facebook.com/SMPBack2School2017/
Thanks To ALL Donors, Bawiin Naman Natin sa Profits
Reply
#14
Thx boss Big Grin
killing time lang hehe
Reply
#15
contribute din ako.

filter stocks with NFB. gawin lng '<' ang '>' pra maging NFS hehe.

Code:
AddColumn(O,"Open", 1.4);
AddColumn(H,"High", 1.4);
AddColumn(L,"Low", 1.4);
AddColumn(C,"Close", 1.4);
AddColumn(Volume,"Volume Today", 1, colorBlue);
AddColumn(OpenInt,"NFB", 1.2, colorBlue);

Filter = OpenInt > 0;

Volume Spike - filter stocks whose volume for the day is greater than the average volume for the past 30 days
Code:
// volume spike ( check stocks whose volume for the day is at least 10% greater than its 30 day ave volume )
Volume_to = Sum(Volume, 31);
Volume_to = Volume_to - Volume;
Volume30 = Volume_to / 30;
percentage = ( abs( Volume30 - Volume ) ) / Volume30;
percentage = percentage * 100;

AddColumn(O,"Open", 1.4);
AddColumn(H,"High", 1.4);
AddColumn(L,"Low", 1.4);
AddColumn(C,"Close", 1.4);
AddColumn(Volume30,"Ave 30 days Volume", 1, colorBlue);
AddColumn(Volume,"Volume Today", 1, colorBlue);
AddColumn(Percentage," % Increase", 1.2, colorBlue);

Filter = Volume > Volume30 AND percentage > 10;
// volume spike

meron pa sana ako blue line scanner(boss mave techinique) kaso napulot ko sa ibang forum tsaka hindi ako gumawa eh. pa modify na lng sa preference nio. winking
Ang Na Ang Na Sulakihin Somaskidot Moko Moko!

Reply
#16
...ipaalam mo muna sa kanila kung pwede mapa-post din dito Smile I'm sure payag naman sila, acknowledge mo lang sila by putting the link pag pinost mo japy
Facebook Link to our 2017 SMP Charity Pictures https://www.facebook.com/SMPBack2School2017/
Thanks To ALL Donors, Bawiin Naman Natin sa Profits
Reply
#17
... dami salamat sa inyo. Big Grin

mukhang pwede na ako mag pamodify sa ginagawa kong code ah Smile makapamigay nga muna +1rep sa inyo Big Grin
Reply
#18
Happy weekend SMP...

if ever may time kayo, pakimodify naman itong code na ito. sa buy signal medyo ok lang naman ang sell signal lang medyo late. ano kaya pwede idagdag dito para di gaano mawala ang profit Smile

green arrow => buy signal
red arrow => sell signal

Thanks...

ito po ang code:

_SECTION_BEGIN("RSI EMA");

Plot (EMA(RSI(14),5), "Smoothed RSI-5", colorGreen , styleNoLabel | styleThick);
Plot (EMA(RSI(14),20), "Smoothed RSI-14", colorRed , styleNoLabel | styleThick);
GfxSetTextAlign(6 );// center alignment
GfxSetOverlayMode(1 ) ;
GfxSetTextColor( colorGold );
GfxSetBkMode(0); // transparent
GfxSelectFont("Time news roman", Status("pxheight")/10 );
GfxTextOut("Stock Market Pilipinas " , Status("pxwidth")/2, Status("pxheight")/3 );

Buy = Cross(EMA (RSI(14),5), EMA (RSI(14), 20));
Sell = Cross(EMA (RSI(14),20), EMA (RSI(14), 5));


PlotShapes(IIf(Buy,shapeUpArrow,shapeNone) ,colorBrightGreen);
PlotShapes(IIf(Sell,shapeDownArrow,shapeNone),colorRed);

_SECTION_END();

sample output (di kasama sa code yong sa itaas ha, sa baba lang ang output ng code):

[Image: smoothrsi.jpg]
Reply
#19
boss, paano yung code sa taas? yan ba yung harmonics?
Reply
#20
.... yap code ng harmonics po yan, pero di ako ang gumawa ng code nadownload ko lang sa internet. di ko nga alam sinong gumawa nyan basta dinadownload ko na lang hehe Smile
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)
image host