Amibroker Coding in AFL -- 2

Job ID: 38246376

Budget: $10 – $100 AUD

Hi, I need someone to do some amibroker coding for me. I need:

1. Add the following fields to my Amibroker screen at the top left (photo attached):
- Stock name - This is norgate provided data
- Stock Industry - This is norgate provided data
- Stock Shares outstanding - This is norgate provided data
- Max stop - This number is given by = Closing share price minus average true range over the last 20 days (ATR). ATR is calculated already (see attached formula).

So for example for a daily chart the output should be something like:
WAF.AU - West African Resources Limited Ordinary - Daily 17/10/2023 Open 0.745, Hi 0.755, Lo 0.74, Close 0.75 (0.0%), ATR(20) 0.03, Max Stop 0.72, ADR(20) 3.54

(I want the MA, MA1 and MA2 lines to display on the chart but not be outputted as text)


2. Modify the following formula so its output text turns green when the symbol $SPX has its 10 day moving average (MA) above its 20 day MA and both of these are sloping upwards. If this condition is not met the font is red:

_SECTION_BEGIN("ADR");
// adapted to AFL by beppe, https://forum.amibroker.com/t/qullamaggie-adr-formula-for-ab/35933/3
// modified by RioL for userdefined parameters, to be able to use the style "hidden" => current ADR will only be shown in the top of the chart and not the line itself
//////////////////////////////////////////////////////////
// TC 2000 - code - From: https://qullamaggie.com/faq/
// It’s the average daily range in % over the past 20 sessions.
// 100*((H0/L0+H1/L1+H2/L2+H3/L3+H4/L4+H5/L5+H6/L6+H7/L7+H8/L8+H9/L9+H10/L10+
// H11/L11+H12/L12+H13/L13+H14/L14+H15/L15+H16/L16+H17/L17+H18/L18+H19/L19)/20 -1)
Periods = Param("Periods", 20, 2, 300, 1, 10 );
ADR = 100 * ( MA( High / Low, Periods ) - 1 );
Plot( ADR, StrFormat("ADR(%g)", Periods), ParamColor( "Color", colorCycle ), ParamStyle("Style") );
_SECTION_END();

Thanks