hong kong
Posts: 6 since May 2013
Thanks Given: 1
Thanks Received: 1
|
Hi, I am trying to set trailing stops for individual position but I could not find any keyword related to position management.
I would like to set a trailing stop loss when the open position profit is greater than a certain amount. Any amount less than the floating profit will not activate the trailing stop.
The idea should be as follows,
if (openpositionprofit > 5000) then ApplyStop(2,2,trailingpoint,1,False,0);
I wonder if there is such keyword as openpositionprofit, or similar
Also, I am wondering if I can separate the stop losses and trailing stops for long and short positions, as in some cases, they may need different parameters.
If someone is familiar with keywords in amibroker, please educate me if the below keywords are available in amibroker
- last buy entryprice (or current position entry price)
- last short entryprice
- islongshort ( 1 if long, -1 if short)
- isflat (1 if there is current position, 0 if flat)
|