PureBytes Links
Trading Reference Links
|
Hello,
> I wanted to generate profit and loss targets in descending scale and
> optimize them. So, for example assume 10% Profit Target:
>
> Prices New Koef New Descending %
> (1/log10(Buy))
> 10 1 10
> 20 0.768621787 7.5
> 30 0.676992493 6.67
> 40 0.624196351 6.25
> 50 0.58859191 5.8
> 60 0.562381856 5.67
>
So you should use BuyPrice (not Buy) variable for the calculation
X = 10/Log10( BuyPrice ); // gives 10 for buyprice of 10
Y = 10/Log10( BuyPrice );
ApplyStop( 0, 1, X, 1 );
ApplyStop( 0, 1, Y, 1 );
Best regards,
Tomasz Janeczko
===============
AmiBroker - the comprehensive share manager.
http://www.amibroker.com
|