Configure yesterday's Low and weekly low data

Hi I need a little help here



I'm a developer but Swift iOS per Python is not my best



so I'm programming visually

I have a strategy that I want to program 



The price above 50 MA



Yesterday's low or red day Low or 2 days low ( red day )

Today the price makes a new low but goes back above yesterday's low.



On weekly charts 



The price makes a weekly low the following week the price makes a new low but the price reverses go back above the low of the previous week.



Condition Buy when price reverses and hold until the 1 or 2-day high



stop the low  



Hi Erinson,



With respect to Python, you can use yfinance library to download daily data and pandas and numpy to create a strategy logic. For example, download daily OHLC data of Apple using yfinance and storing it in a pandas dataframe called apple.



 think you will need two conditions for the daily charts. Digging deeper, let's focus on the statements, "yesterday's low or red day Low or 2 days low ( red day )

Today the price makes a new low but goes back above yesterday's low."

Assume that today is 28-09-2022

First, you will check whether yesterday's close price is less than yesterday's close price (so that yesterday is a red day)

Further, you will compare today's low price with yesterday's price, if this condition is fulfilled, you will move ahead.

You will then check today's close price is higher than today's low price or not. If it is true, then as you are mentioning, you will set a buy signal. 



In a similar manner, you can code the exit signals as well.



You can try the free "Python for trading: basic" course on Quantra to understand how to code a strategy like this on Quantra. There is also the free handbook on Python for trading which you can browse through as well.  OR you can check the paid courses on Quantra which will help you further as well.





If you are looking for a programmer to code the strategy which you are proposing, then I am afraid this community might not be the best platform. You can always try rent a coder services which are available elsewhere.