Relative Strength

i have two requirements:

  • I would like to track the ratio of two stocks as a chart as well and it corresponding 20EMA overlay in the same chart. Eg: TSLA with SPX; (TSLA/SPX value)

  • I would like to overlay Dow Jones index chart with TSLA chart in the same chart; Dow Jones index scale on left and TSLA scale on right - they shouldnt have the same scale on right - because TSLA is in 200s and DJI is in 20 thousands...

My first preference is to do the above with out coding - but if i must code to accomplish this i will....Can you pls point to the right direction?

Thanks..Satish

First select TSLA as active symbol then add Spread AFL to empty chart via drag & drop from Charts - Basic Charts window. Set your 2nd symbol (SPX) in Parameters of Spread AFL.
842

Next drag&drop EMA from Averages folder onto exiting Spread chart


First add Price AFL to empty chart via drag & drop from Charts - Basic Charts window

Next drag&drop Price (foreign) from Basic Charts folder onto existing Price chart and set Symbol name in Parameters as well as set to OwnScale in parameter settings -> Style of Foreign price section there (see picture below).


You would have to draw price axis on left side yourself via Gfx low level graphics as it is not natively available in AB.

2 Likes

Thank you - is there any example for using low level graphics to draw price axis on left side?

Quick follow up ? How to code the spread in AFL? If i want to track TSLA/SPX ; eg: Close/$SPX?

In the Charts pane, right click on Spread and select "Edit" to see how it's coded in AFL.