sentdex

Python: Accumulative Swing Index (ASI) 3 Mathematics and Stock Indicators

sentdex

Summary

The tutorial focuses on calculating the swing index, specifically the variable K. The calculation for K is simplified compared to the previous variable R, as it involves determining the largest value between H2 minus C1 and L2 minus C1. A function named `calc_K` is created to perform this calculation, where the results are printed and returned.

Following the calculation of K, the tutorial progresses to define the parent function for the swing index, which includes parameters such as O1, O2, H1, H2, L1, L2, C1, C2, L, and M. The tutorial emphasizes the importance of organizing the code clearly and ensuring that all variables are correctly defined and plugged into the function. The session concludes with a promise to complete the swing index function in the next installment.

More from sentdex

See all episodes →