PureBytes Links
Trading Reference Links
|
Hi,
I believe that you can accomplish what you are seeking via the ValueWhen function. However, you will need to add better error checking to your "25th of each month" to account for that day falling on a weekend or holliday.
Here is an untested simplistic example (to illustrate the concept) ignoring the fact that the 25th may not happen for any given month (as a result of being a weekend or holliday).
Mike
Scores = ...; // My PositionScore logic Day25 = Day() == 25; // Naive 25th day
Buy = ...; // My Buy logic PositionScore = ValueWhen(Day25, Scores); // Use PositionScore of 25th day
--- In amibroker@xxxxxxxxxxxxxxx, "slipthruthecracks" <slipthruthecracks@xxx> wrote: > > Since Positionscores are done on buy/sell dates, is it possible to calculate the position score on a given day each month but not make the trade until a given date in the next month. For instance, how would one tell the AA that you want to calculate the positonscore on the 25th of the month and enter the resulting trade on the 1st of the next month? Trade delay does not seem to work since months have different lengths. With a buy date of he 25th of each month a trade delay of 6 puts the trade on the 1st when the month has 30 days and in March it puts it on the 3rd since Feb has 28 days and on months with 31 days, the trade is on the 31st. > > One-Eyed-Jack >
__._,_.___
**** IMPORTANT PLEASE READ ****
This group is for the discussion between users only.
This is *NOT* technical support channel.
TO GET TECHNICAL SUPPORT send an e-mail directly to
SUPPORT {at} amibroker.com
TO SUBMIT SUGGESTIONS please use FEEDBACK CENTER at
http://www.amibroker.com/feedback/
(submissions sent via other channels won't be considered)
For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/
__,_._,___
|