I do not understand the code of the Percent Stop Loss provided in MultiCharts.
Let's see the code of Percent Stop LX
What I understand is that code is used to exit from a long entry.
Code: Select all
inputs: StopLossPct( .05 ) ;
SetStopShare ;
if MarketPosition = 1 then
SetStopLoss( EntryPrice * StopLossPct )
else
Sell ( "PctStopLX-eb" ) next bar at Close * ( 1 - StopLossPct ) stop ;
if MaketPosition = 1 then // Indicates a long position in the doc
SetStopLoss( EntryPrice * StopLossPct ) // We set a stop at the Entry Price * StopLossPct
Hmm let's take an example.
I have bought a share at 100$ (I'm long).
I set a stop by default at 100$*0.05 = 5$??? WTF?
It should be EntryPrice * (1 - StopLossPct) = 100$ - (1-0.05) = 95$
What am i missing?