To plot Amibroker Trailing StopLoss using stopModeRisk


#1

Hi All,

I’m using the following StopLoss in my strategy and would like to plot the same.

ApplyStop(stopTypeTrailing,stopModeRisk,5);

The idea of the same is as follows;

Entry Price = 100

High Price after Entry = 120

StopLoss = 5% of (120-100) = 5% of 20 = Rs.1 is the Stoploss

Can somebody point me in the right direction for the same?

The issue I’m facing are the following;

  1. To get the entry price of a scrip. I understand it is the BuyPrice, but how can I refer to the BuyPrice of multiple symbols in which I’ve already holding a position?
  2. Is this a feasible StopLoss logic and not sure if this logic is practically implementable/executable.