gawdib
2nd June 2006, 12:43 AM
Hi John:
Great additions.. the external formula with transaction costs. etc
I would like to calculate a variable transaction cost of margin,
However, the present ext function does not allow.
I notice there are a lot of ext. functions developed on the Metastock Forum that allow a variable, when in the old Metastock version there could be no variable An example. mov(c,.....,s): would only allow a consant, etc.
Would it not be fairly easy to allow the transaction cost to be variable with slight changes to their coding, ( the coding seems to be open for use by others?). Or perhaps you know this coding already?
After that there would have to be some way of multipying the cost per share by the number of shares that were actually bought by the Tradesim simulation.
Thus for each share: I would like to deduct the cost of use of 50% margin from the results of exiting a trades by:
Devloping the idea: OK i am going to borrow 50 % of the value of the entry trigger price. Then, i will use an approximate yearly margin rate of 10%. Then, i need to put in a multiplier that calculates the amount of time in the trade ( with the barssince).
ExtFml( "TradeSim.SetValue",transactioncost , (.50*ValueWhen(1,longentrytrigger,O)
)
*.10 {margin rate}*
(
Ref(BarsSince(longentrytrigger{ this would refer to the approximate price when the stock was at the entry price.. The ref are to allow Metastock not to confuse the entry price with the present }) ,-4)
/356){gives the number of years and fractions been in the trade} ;
Would it work if the transaction cost thing allowed a variable?
Best Regards,
Geoffrey
Great additions.. the external formula with transaction costs. etc
I would like to calculate a variable transaction cost of margin,
However, the present ext function does not allow.
I notice there are a lot of ext. functions developed on the Metastock Forum that allow a variable, when in the old Metastock version there could be no variable An example. mov(c,.....,s): would only allow a consant, etc.
Would it not be fairly easy to allow the transaction cost to be variable with slight changes to their coding, ( the coding seems to be open for use by others?). Or perhaps you know this coding already?
After that there would have to be some way of multipying the cost per share by the number of shares that were actually bought by the Tradesim simulation.
Thus for each share: I would like to deduct the cost of use of 50% margin from the results of exiting a trades by:
Devloping the idea: OK i am going to borrow 50 % of the value of the entry trigger price. Then, i will use an approximate yearly margin rate of 10%. Then, i need to put in a multiplier that calculates the amount of time in the trade ( with the barssince).
ExtFml( "TradeSim.SetValue",transactioncost , (.50*ValueWhen(1,longentrytrigger,O)
)
*.10 {margin rate}*
(
Ref(BarsSince(longentrytrigger{ this would refer to the approximate price when the stock was at the entry price.. The ref are to allow Metastock not to confuse the entry price with the present }) ,-4)
/356){gives the number of years and fractions been in the trade} ;
Would it work if the transaction cost thing allowed a variable?
Best Regards,
Geoffrey