In Progress

Correct AFL code for Amibroker : To use Heikin Ashi for Foreign Ticker

Hi can you plz help me in this afl code

i want use Heikin Ashi of Foreign Ticker to generate signal on Main Chart

I.e. when Foreign Ticker turn red candle in Heikin Ashi It should give buy Signal on main chart

I dont know what going wrong

_SECTION_BEGIN("ABC");

SetForeign( "ForeignTickereHere" );

SetChartOptions(0,chartShowArrows | chartShowDates);

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 ) );

xDiff = (HaHigh - Halow) * 10000;

CondB8F = HaOpen < HaClose;

CondS8F = HaOpen > HaClose;

CondB9F = HaLow > ME;

CondS9F = HaHigh < ME;

//Plot(TL,"",colorPink,styleLine);

//Plot(BL,"",colorPink,styleLine);

CondB8F = HaOpen < HaClose;

CondS8F = HaOpen > HaClose;

RestorePriceArrays();

_SECTION_END();

_SECTION_BEGIN("heiken");

SetChartOptions(0,chartShowArrows | chartShowDates);

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 ) );

xDiff = (HaHigh - Halow) * 10000;

barcolor = IIf(HaClose >= HaOpen,colorBrightGreen,colorRed);

PlotOHLC( HaOpen, HaHigh, HaLow, HaClose, "", barcolor, styleCandle );

;

Plot(ME,"",colorBlue,styleLine);

Plot(TL,"",colorPink,styleLine);

Plot(BL,"",colorPink,styleLine);

CondB8 = HaOpen < HaClose;

CondS8 = HaOpen > HaClose;

Buy = Cover= CondS8F ;

Short= Sell=CondB8F ;

Buy=ExRem(Buy,Sell);

Sell=ExRem(Sell,Buy);

Short=ExRem(Short,Cover);

Cover=ExRem(Cover,Short);

Long=Flip(Buy,Sell);

Shrt=Flip(Short,Cover);

/* We use live prices here, as ValueWhen function gives negative price sometimes */

buyPrice = LastValue(C);

sellPrice = LastValue(C);

D= floor(10000/C);

SetPositionSize( 500, spsShares ); // max share that can be bought in rs10000 shares by default

PlotShapes(IIf(Buy, shapeUpArrow , shapeNone), colorBlue);

PlotShapes(IIf(Short, shapeDownArrow , shapeNone), colorBlack);

PlotShapes(IIf(Sell, shapeStar , shapeNone), colorBlue);

PlotShapes(IIf(Cover, shapeHollowSmallSquare , shapeNone), colorBlack);

_SECTION_END();

Kind regards

Sam

Skills: Amibroker Formula Language, C Programming, C# Programming, C++ Programming, Metatrader

See more: amibroker heikin ashi chart, heikin ashi candlesticks afl amibroker, www wisestocktrader com indicators, amibroker afl code library, heiken ashi afl formula, heiken ashi supertrend afl, amibroker afl code for intraday, wisestocktrader special afl, afl code amibroker, convert afl code amibroker dll, hide afl code amibroker, amibroker afl code hide dll, amibroker afl code protect, secure afl code amibroker, default afl code amibroker, write afl code amibroker, system amibroker afl code, amibroker afl code dll file, afl code amibroker mt4, low amibroker afl code

About the Employer:
( 0 reviews ) Muzaffarnagar, India

Project ID: #19045834

Awarded to:

ameheta

Amibroker Software Experience Configuration of databases Free EOD data base configuration from BSE and NSE. Free Intraday data configuration from zerodha pi or any software which provide data in excel format. Confi More

₹1500 INR in 1 day
(2 Reviews)
2.3