Simple Coding Help - No Promise.

Hi!

I am looking for the AFL. NO BUY/ SELL INDICATION NEEDED...

Wanted to plot just Horizontal Lines.

Started a thread regarding this request...

The same is as under:

Wanted to plot the following Horizontal lines on the chart (this horizontal lines should be visible on any time frame, be it 1 mins or 1 moth)

Wanted to plot Open, High, Low & Close of the Last 03 Trading Days.


For Example,

For trading Chart of Today i.e. 10/08/2015 (Monday), I want to plot Open, High, Low & Close of
5/08/2015 (Wednesday), 6/08/2015 (Thursday) and 7/08/2015 (Friday).

For Trading Chart of 11/08/2015 (Tuesday), I want to plot Open, High, Low & Close of
6/08/2015 (Thursday), 7/08/2015 (Friday) & 10/08/2015 (Monday)

This lines should have ids. Eg.
Open of 10/08/2015 (Monday) can have O1
Open of 07/08/2015 (Friday) can have O2
Open of 06/08/2015 (Thursday) can have O3

The same way for, High (H1/ H2/ H3), Low and Close.

Option of Selection of types of lines (i.e. normal, thick, dotted, thick & dotted, etc) and colors will make this afl more useful.

Thank a lot in advance.


Waiting for a afl guru to create this afl.

I am sure the AFL I am looking for is easy one... and some Good Hearted AFL Guru will help out...

Regards.
 

nifty trade

Well-Known Member
Do we have AFL for identifying gaps between high lows between 2 or 3 consecutive bars?

Suppose there are 3 bars of 5 minutes and there is uptrend and there is gap between high of the 1st bar and low of the 3rd bar, same for down trending bars.

Thanks
 

PUCHU_2500

Well-Known Member
Waiting for a afl guru to create this afl.

I am sure the AFL I am looking for is easy one... and some Good Hearted AFL Guru will help out...

Regards.
do u want like this trend line.....(I am not coder, zero in coding....just edited/added from other's afl....)

 

PUCHU_2500

Well-Known Member
PUCHU_2500,

Not exactly the same.

But its near one. Kindly share the afl.

Thanks and Regards.
BT = ParamTime ("3 Day Trend Line", "09:29:59");
NewDay = Day()!= Ref(Day(), -1);
highestoftheday = HighestSince(newday,H,1);
Lowestoftheday =LowestSince(newday,L,1);
Closeoftheday=ValueWhen(TimeNum()==092959,C);
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
DC=TimeFrameGetPrice( "C", inDaily, 0);
DC1=TimeFrameGetPrice( "C", inDaily, -1);
dh=TimeFrameGetPrice( "H", inDaily, 0);
dh1=TimeFrameGetPrice( "H", inDaily, -1);
dh2=TimeFrameGetPrice( "H", inDaily, -2);dh3=TimeFrameGetPrice( "H", inDaily, -3);
dh3=TimeFrameGetPrice( "H", inDaily, -3);
DL=TimeFrameGetPrice( "L", inDaily, 0);
dl1=TimeFrameGetPrice( "l", inDaily, -1);
dl2=TimeFrameGetPrice( "l", inDaily, -2);
dl3=TimeFrameGetPrice( "l", inDaily, -3);
dl5=TimeFrameGetPrice( "l", inDaily, -5);
do1=TimeFrameGetPrice( "o", inDaily, -1);
do2=TimeFrameGetPrice( "o", inDaily, -2);
do3=TimeFrameGetPrice( "o", inDaily, -3);
dc1=TimeFrameGetPrice( "c", inDaily, -1);
dc2=TimeFrameGetPrice( "c", inDaily, -2);
dc3=TimeFrameGetPrice( "c", inDaily, -3);

Plot(dh1,"",colorYellow,styleDots);
Plot(dh2,"",colorRed,styleDots);
Plot(dh3,"",colorWhite,styleDots);
Plot(dl1,"",colorBlue,styleDots);
Plot(dl2,"",colorOrange,styleDots);
Plot(dl3,"",colorGreen,styleDots);
Plot(dc1,"",colorPink,styleDots);
Plot(dc2,"",colorViolet,styleDots);
Plot(dc3,"",colorDarkGreen,styleDots);
Plot(do1,"",colorLightGrey,styleDots);
Plot(do2,"",colorAqua,styleDots);
Plot(do3,"",colorBrightGreen,styleDots);



_SECTION_END();
 
Hi,
Does anyone know, how to get incremental time update in real time like this? (it's also be called Realtime x interval backfill)
what macro code do i need to type ?

Does Now + TimeValue("00:05:00") output it like this?
what VBA do i need for this?
Thank you
 

Attachments

hmp

Well-Known Member
Hi
I have following afl with buy sell arrows & mix scanning for crossover between 5/34 EMA & crossover between 5/200 EMA.
Can some experts add exploration for this two crossovers condition with separate columns for them?Means i want one column with 5/34 EMA and another with 5/200 EMA.
Regards.
Code:
_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", colorBlack ), styleNoTitle | ParamStyle("Style") | GetPriceStyle() ); 
_SECTION_END();
_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("EMA");
P = ParamField("Price field",-1);
Periods = Param("Periods", 15, 2, 300, 1, 10 );
Plot( EMA( P, Periods ), _DEFAULT_NAME(), ParamColor( "Color", colorCycle ), ParamStyle("Style") ); 
_SECTION_END();

_SECTION_BEGIN("EMA1");
P = ParamField("Price field",-1);
Periods = Param("Periods", 15, 2, 300, 1, 10 );
Plot( EMA( P, Periods ), _DEFAULT_NAME(), ParamColor( "Color", colorCycle ), ParamStyle("Style") ); 
_SECTION_END();

_SECTION_BEGIN("EMA2");
P = ParamField("Price field",-1);
Periods = Param("Periods", 15, 2, 300, 1, 10 );
Plot( EMA( P, Periods ), _DEFAULT_NAME(), ParamColor( "Color", colorCycle ), ParamStyle("Style") ); 
_SECTION_END();
_SECTION_BEGIN("EMA");
P = ParamField("Price field",-1);
Periods = Param("Periods", 200, 2, 300, 1, 10 );
Plot( EMA( P, Periods ), _DEFAULT_NAME(), ParamColor( "Color", colorCycle ), ParamStyle("Style") ); 
_SECTION_END();

_SECTION_BEGIN("EMA1");
P = ParamField("Price field",-1);
Periods = Param("Periods", 200, 2, 300, 1, 10 );
Plot( EMA( P, Periods ), _DEFAULT_NAME(), ParamColor( "Color", colorCycle ), ParamStyle("Style") ); 
_SECTION_END();

_SECTION_BEGIN("5 by 200 cross buy");
Sell = Cross (EMA (Close, 200), EMA (Close, 5)) ;
Buy = Cross (EMA (Close, 5), EMA (Close, 200)) ;
_SECTION_END();

_SECTION_BEGIN("5 by 200 cross buy");
Sell = Cross (EMA (Close, 200), EMA (Close, 5)) ;
Buy = Cross (EMA (Close, 5), EMA (Close, 200)) ;
_SECTION_END();
/* Plot Buy and Sell Signal Arrows */
shape = Buy * shapeUpArrow + Sell * shapeDownArrow;
PlotShapes( shape, IIf( Buy, colorWhite, colorWhite ), 0, IIf( Buy, Low, High ) );
GraphXSpace = 5;

_SECTION_BEGIN("EMA2");
P = ParamField("Price field",-1);
Periods = Param("Periods", 15, 2, 300, 1, 10 );
Plot( EMA( P, Periods ), _DEFAULT_NAME(), ParamColor( "Color", colorCycle ), ParamStyle("Style") ); 
_SECTION_END();

_SECTION_BEGIN("5 by 34 cross buy");
Sell = Cross (EMA (Close, 34), EMA (Close, 5)) ;
Buy = Cross (EMA (Close, 5), EMA (Close, 34)) ;
_SECTION_END();

_SECTION_BEGIN("5 by 34 cross buy");
Sell = Cross (EMA (Close, 34), EMA (Close, 5)) ;
Buy = Cross (EMA (Close, 5), EMA (Close, 34)) ;
_SECTION_END();
/* Plot Buy and Sell Signal Arrows */
shape = Buy * shapeUpArrow + Sell * shapeDownArrow;
PlotShapes( shape, IIf( Buy, colorYellow, colorYellow ), 0, IIf( Buy, Low, High ) );
GraphXSpace = 5;

_SECTION_BEGIN("EMA2");
P = ParamField("Price field",-1);
Periods = Param("Periods", 34, 2, 300, 1, 10 );
Plot( EMA( P, Periods ), _DEFAULT_NAME(), ParamColor( "Color", colorCycle ), ParamStyle("Style") ); 
_SECTION_END();
 
Highlights of Amibroker version 6.00

Version 6.00 brings lots of new functionality especially with regards to system testing. There are hundreds of new features and changes to existing functionality as compared to version 5.90, listed in detail in "Release Notes" document in AmiBroker directory. Below is just a short list of few of them:

Integrated high-performance Monte Carlo simulator - with cumulative distribution charts of equity, max. drawdowns, support for custom user-definable metrics and ability to peform MC simulator driven optimizations.
Full Matrix support (two dimensional arrays) in AFL with direct native matrix arithmetic (matrix operations like addition, subtraction, multiplication, division, transpose, etc), see Matrix, MxIdentity, MxTranspose, MxGetSize
Detailed Buy-and-hold (benchmark) statistics automatically added to the backtest reports
User definable stop precedence (SetStopPrecedence function) and stop validity (ValidFrom/ValidTo parameters in ApplyStop function)
Sparse array support: SparseCompress, SparseExpand
Infinite Impulse Response filter function (IIR) for efficient implementation of higher order smoothing algorithms
Raw text output in explorations via AddRow function
New styles supported by Exploration XYCharts
Variable period Percentile function
Unicode (UCN) support in PlotText, PlotTextSetFont, GfxDrawText, GfxTextOut, chart titles, interpretations and commentary windows (allows various graphic annotations / windings )
New Low level graphic functions: GfxSelectHatchBrush, GfxSelectStockObject
wildcard matching function StrMatch
enhanced Assignment Organizer
Word-wrap functionality in AFL editor and enhanced "Code Prettify" function
 
Hi,
Does anyone know, how to get incremental time update in real time like this? (it's also be called Realtime x interval backfill)
what macro code do i need to type ?

Does Now + TimeValue("00:05:00") output it like this?
what VBA do i need for this?
Thank you
This thread is primarily for help in AFL and that too coding help that are very simple in nature. Kindly do not post requests for VBA here.

Admins, please kindly delete the post # 1101644.
 

Nehal_s143

Well-Known Member
I need urgent help and I will be very grateful if some expert generously gives some time to better this afl. I had made this request earlier too. But unfortunately i cudn't get a reply.
This is a simple Tom DeMark Trendline afl. It draws trendline connecting two recent fractals starting from right. I have used it on intraday chart. It draws the best trendline. But it is bad afl because it is too memory intensive and many a times Amibroker gets stucks when it is loaded. Perhaps it is due to "For" loop. Is there a way to avoid For Loop in the following code and make it better?

Which ver of amibroker you are using ?
 
Last edited:

Similar threads