Amibroker AFL code for 52 Week New High-New Low Index

MarketSecrets - Learn To Trade Like a Pro

Amibroker AFL code for 52 Week New High-New Low Index:

Script:

//——————————————————————————
//
// Formula Name: 52 Week New High-New Low Index
// For more scripts, visit: www.marketsecrets.in
//
//——————————————————————————
//
// Calculates new 52 week High’s vs new 52 week lows. Input a Date 5 years
// back to the current Date in the Range section of the Analysis Window AND
// click the From button. In the Apply To section, click the Use Filter button
// AND click the Define > Include > Group > Stock to scan stocks ONLY. Right
// click on chart window,
//
// then > Parameters > Show MiddlLe Lines – NO > Levels > +-100. Compare
// against the index, look for convergences, divergences.
//
//——————————————————————————

// Calculates new 52 week High’s vs new 52 week lows.
// The new symbol “~NewHiNewLoIndex” will be found in the Workspace > Symbol > All > at the end.
// Input a Date 5 years back to the current Date in the Range section of the Analysis Window AND click the From button.
// In the Apply To section, click the Use Filter button AND click the Define > Include > Group > Stock
// to scan stocks ONLY. Right click on chart window, then > Parameters > Show MiddlLe Lines – NO > Levels > +-100.
// Compare against the index, look for convergences, divergences.

H1 = High > Ref(HHV(High,260),-1);
L1 = Low < Ref(LLV(Low,260),-1);
HiLoDifference = H1 – L1;

Buy = 0;
Filter = 0;

AddToComposite( HiLoDifference , “~NewHiNewLoIndex”, “X”, atcFlagDefaults = 7);

GraphXSpace = 10;
Plot(Foreign(“~NewHiNewLoIndex”,”C”,1),”52 Week New High – New Low Index”,colorYellow,styleHistogram);

Download File

error: Content is protected !!