Login Page - Create Account

Support Board


Date/Time: Tue, 03 Dec 2024 13:54:22 +0000



Post From: CROSSFROMABOVE, CROSSFROMBELOW function

[2016-01-03 20:02:45]
User87521 - Posts: 83
I am trying to create a fairly simple spreadsheet auto trade program that would take a moving average and trigger a long trade as the moving average crosses up through a horizontal pivot point. Conversely, the long is sold as the m.a. crosses down through a pivot point. There are multiple pivot points. (16) I used the horizontal line study to plot the pivot points. All seems to have gone well.

I am having trouble with the range parameters in the CROSSFROMABOVE/CROSSFROMBELOW function. For the m.a. it seems fairly simple, I used the last two m.a.'s produced by the spreadsheet for the first range. It is the second range that I am having trouble with. I used the last two values produced by the horizontal line study in the spreadsheet. These numbers are identical, of course. It did not seem to work as it gave a FALSE output for the entire study. I used a horizontal range (as was output in the spreadsheet from the horizontal pivot study) using two of the pivot points but that doesn't seem right. I also used a single data point for the pivot point to see what output that would produce.

My question is which set of parameters should be used for the second range. Once I know for sure which range to use I can troubleshoot the results with more confidence.

If you are trying to visualize the pivots better, just assume the SPX with a horizontal pivot every 20 points from 1800. That would work just fine.

Thanks.