Ideas Portal

Making the best platform for traders together

a code to plot directional trends

I have something which I would love coded but it is not really exciting, so I'm not sure it would be taken seriously, but here goes. I am posting this in response to an email Michael just sent out called sitting on gold.

I like to use a technique I was taught by a mentor (who has now passed) which gives me a directional trend on yearly, quarterly, and monthly basis. I then use these trends to swing trade. I have to plot these on the chart manually because I do not know how to code them.

They work as follows.

For monthly trends (I use red), if the highest daily closing price (and in the case of forex, this is when New York closes) is higher than the highest daily closing price of the last month, the trend is up. If the daily closing price is lower than the lowest daily closing price of the last month, the trend is down. When it comes to quarterly, the same applies but in this case I use green. If the highest daily closing price is higher than the highest daily closing price of the last quarter, the quarterly trend is up..etc etc. The yearly does the same and uses black lines. I also plot horizontal lines (using the same colours) which indicate what prices the trend will resume or will change on the specific time frames.

Note also, that if there is an inside month/quarter/year, i.e. there is no closing daily price which exceeds either the highest or lowest daily closing price of the last period in question, then the trend reverses.

I have attached an image which shows the monthly trends in red, and the quarterly trends in green, and the horizontal price levels which will indicate if there is a trend continuation or reversal.

  • Guest
  • Oct 13 2019
  • Attach files