|
Kiran
2019-06-04 13:26:39
|
|
I'm using name3 Symbol field to capture a numeric field [0-2], where if the earnings are reported in Jan/Apr/Jul/Oct = 0, Feb/May/Aug/Nov=1, etc.
Then, I use the calculation below to estimate how many months to earnings.
I'm using this as a BuyRule so i don't enter positions in earnings month. [i.e. Buy = months2earnings>0]
months2earnings = name3 - month()-4*round(month()/4,0);
The assignment gives an error because name3 isn't numeric.
- Is there another field i can use/create that's numeric? Don't want to create a custom database for "Earnings Month" because this value isn't date-dependent.
- If not, how do i case name3 to a numeric field, so the above assignment can evaluate.
|
|