I'm trying to work out how i would create a strategy, where i can buy the market everytime it drops 10%.
But how do i code a 10% drop?
Like every swing the market goes up and down, whenever it swings down 10% , i want to buy it.
How would i code that?
How to create strategy to buy on 10% drop
- TJ
- Posts: 7743
- Joined: 29 Aug 2006
- Location: Global Citizen
- Has thanked: 1033 times
- Been thanked: 2222 times
Re: How to create strategy to buy on 10% drop
First, you have to think through your "strategy"I'm trying to work out how i would create a strategy, where i can buy the market everytime it drops 10%.
But how do i code a 10% drop?
Like every swing the market goes up and down, whenever it swings down 10% , i want to buy it.
How would i code that?
-- What EXACTLY do you want to do?
-- How do you want to do it?
-- Where do you want to do it?
Second, you have to be precise. You have to establish a reference point.
Where is the 10% drop from?
From today's high?
From yesterday's close?
From yesterday's high?
From 3-month high?
From all-time high?
From last year's high?
Buy on 10% drop is a concept, NOT a strategy.
You need some concrete planning to make it an actionable project.
Re: How to create strategy to buy on 10% drop
It's definitely possible to use the swing high. Are you asking how to code a swing high function? (Because once you have that, coding the strategy you describe would be very easy.)