pa247 143 posts msg #147859 - Ignore pa247 |
5/21/2019 6:11:57 PM
ive been working on this filter for 2 days and its not going the way I expected. I dont know where ive gone wrong in the formula so could someone please look and see where ive messed it up? The TMF variable is coming out to .01 or .010 on every stock which is not correct. Thank you!
|
graftonian 1,089 posts msg #147869 - Ignore graftonian |
5/22/2019 11:49:20 AM
your line
"set{rangeV, EMA(range1)}"
did you mean?
set{rangeV, CEMA(range1, XXX)}
|
xarlor 587 posts msg #147873 - Ignore xarlor |
5/22/2019 4:05:33 PM
I'm not sure if this is what you were hoping for, but graft is right. For custom EMAs you need the fuction CEMA(indicator,days).
I changed 3 instances on your original filter to CEMA and did it for 30 days.
Also, your HH and LL was incorrect. You were comparing the high and low to today's close instead of the previous day's close.
|
Cheese 1,374 posts msg #147874 - Ignore Cheese |
5/22/2019 5:28:22 PM
I am not familiar with the above TMF filters, but here is the version for basic subs
|
Cheese 1,374 posts msg #147875 - Ignore Cheese |
5/22/2019 5:36:51 PM
I'm not sure why xarlor's version sometimes flashed advanced subscription requirement.
|
graftonian 1,089 posts msg #147888 - Ignore graftonian |
5/23/2019 12:07:20 PM
I took the liberty of re-writing one section.
/* Calculate TMF = RangeV / EMA(Volume) * 100 */
set{tmf1, CEMA(volume,30)}
set{tmf2, rangeV - tmf1}
set{tmf3, rangeV / tmf2}
set{tmf, tmf3 * 100}
add column tmf
draw tmf
Is this consistant with your original logic?
|
pa247 143 posts msg #147898 - Ignore pa247 |
5/23/2019 3:51:35 PM
Thank you all for help!!
@xarlor .... I see where you made the change on this part but. What im trying to formulate is .... the lowest low from either yesterdays close or todays low. And the highest high from either yesterdays close or todays high. Is that what your formula shows but in less steps than mine?
from xarlor .......
set{LL, min(low, close 1 day ago)}
set{HH, max(high, close 1 day ago)}
from me .....
set{LL1,low today}
set{LL2,close 1 day ago}
set{HH1,high today}
set{HH2,high 1 day ago}
|
pa247 143 posts msg #147900 - Ignore pa247 modified |
5/23/2019 4:05:40 PM
@graftonian .... 5/23/2019 12:07:20 PM
I took the liberty of re-writing one section.
/* Calculate TMF = RangeV / EMA(Volume) * 100 */
set{tmf1, CEMA(volume,30)}
set{tmf2, rangeV - tmf1}
set{tmf3, rangeV / tmf2}
set{tmf, tmf3 * 100}
add column tmf
draw tmf
Is this consistant with your original logic?
----------------------------------------------------------------
If i substitute this for the way I had it before I get the message I need the advanced subscription. so I cant actually test if it gives the same results.
|
Cheese 1,374 posts msg #147901 - Ignore Cheese |
5/23/2019 4:25:49 PM
pa247, here is your original TMF filter with correct cEMA syntax
|
xarlor 587 posts msg #147917 - Ignore xarlor |
5/24/2019 2:17:48 PM
@xarlor .... I see where you made the change on this part but. What im trying to formulate is .... the lowest low from either yesterdays close or todays low. And the highest high from either yesterdays close or todays high. Is that what your formula shows but in less steps than mine?
from xarlor .......
set{LL, min(low, close 1 day ago)}
set{HH, max(high, close 1 day ago)}
from me .....
set{LL1,low today}
set{LL2,close 1 day ago}
set{HH1,high today}
set{HH2,high 1 day ago}
-----------------------------------------------------
pa427, mine says:
Look at today's Low
Look at yesterday's Close
Give me whichever of the two prices is the lower one
Look at today's High
look at yesterday's Close
Give me whichever of the two prices is the higher one
Your original filter said:
Look at today's Low
Look at today's Close
Give me whichever of the two prices is the lower one
Look at today's High
look at today's Close
Give me whichever of the two prices is the higher one
As for what you posted here:
set{LL1,low today}
set{LL2,close 1 day ago}
set{HH1,high today}
set{HH2,high 1 day ago}
Yes, it's essentially the same thing, only you need to then get the low and high:
set{LL, min(LL1,LL2)}
set{HH, max(HH1,HH2)}
|