Hi to everyone,
This is a quick query whether the MS programming code is able to carry out a specific type of time calculation.
Very simply, if I input a time on which the calculation is to begin, say, 8.10am, and I then want to add a period of time (say, 29mins, 1hr 35mins, etc, etc) to the 8.10am and have a very simple +1 plot on the chart when and where this time period has been calculated, I'm wondering whether MS has the resources to do this relatively simple sounding task.
The easy part of the code to obtain start times of, say, 8.10am on a specific day is obviously this:
sm:=Input("starting month",1,12,1);
sd:=Input("starting day of month",1,31,1);
sy:=Input("starting year",1980,2100,2008);
sh:=Input("hour", 1,24,1);
se:=Input("minute",0,60,0);
start:= sd=DayOfMonth() AND sm=Month() AND sy=Year() AND sh=Hour() AND se=Minute();
However, as I stated above I don't know of a way of simply adding, say, 29 minutes to a start time such as 8.10am and I'm wondering whether the MS code has the resources to do this or whether I'd need to create an external dll.
To those who may be interested, numbers to add to the start such as 29 minutes are square roots of Fibonacci numbers in a simple additive sequence. These square root calculations can be done outside of the MS code and can simply be plugged in later. The main problem is knowing what to do with the code (if it can be done) to add them to selected starting times such as 8.10am.
The whole thing is pretty easy to create in Excel, but I wanted to do it in Metastock Pro to do some real-time testing on very short term charts (1m ideal). The automated signals that would be produced through the "+1 plot" are much easier to work with than having to move back and forth from Excel to the charts. Besides, if the extension of these square root calculations from daily charts to the intraday timeframe does work (to be determined after sufficient testing), the calculations will need to be automated in any case because they need to be updated throughout the trading day and this is too laborious to do in Excel.
Thanks in advance if anyone is able to help ...
Peredur