Buggy code:
@ Library ( "//home//heftyy//JForex//Strategies//libs//joda-time-2.3.jar" ) public class NotNLA implements IStrategy { public enum Direction { UP , DOWN ; } private static class ZeroLine { protected double price ; protected OrderCommand command ; protected Period period ; protected DateTime time ; private UUID uuid ; private IShortLineChartObject shortLine ; private IChart chart ; private IChartObjectFactory factory ; ZeroLine ( double price , IEngine . OrderCommand cmd , Period period , long time , IChart chart ) { } private void endLine ( long endTime ) { } protected static void removeOldLines ( List < NotNLA . ZeroLine > zeroLines , IBar bar , Period period ) { } protected static void updateZLTime ( List < NotNLA . ZeroLine > zeroLines ) { } private void render ( ) { } @ Override public String toString ( ) { } } private IEngine engine = null ; private IIndicators indicators = null ; private IHistory history = null ; private int tagCounter = 0 ; private IConsole console ; private IChart chart ; private IContext context = null ; @ Configurable ( "Lot" ) public double lots = 0.5 ; @ Configurable ( "Slippage" ) public int slippage = 5 ; @ Configurable ( "Period" ) public Period period = Period . FIFTEEN_MINS ; @ Configurable ( "Period<seq2seq4repair_space>ZL" ) public Period periodZL = Period . FOUR_HOURS ; @ Configurable ( "TP<seq2seq4repair_space>before<seq2seq4repair_space>ZL" ) public int takeProfitBeforeZLPips = 12 ; @ Configurable ( "TP<seq2seq4repair_space>max<seq2seq4repair_space>[pips]" ) public int takeProfitMaxPips = 30 ; @ Configurable ( "TP<seq2seq4repair_space>min<seq2seq4repair_space>[pips]" ) public int takeProfitMinPips = 0 ; @ Configurable ( "SL<seq2seq4repair_space>[pips]" ) public int stopLossPips = 30 ; @ Configurable ( "Min<seq2seq4repair_space>bar<seq2seq4repair_space>size[pips]" ) public int minBarSize = 1 ; public int minDifferenceForSequence = 5 ; @ Configurable ( "Attempt<seq2seq4repair_space>close<seq2seq4repair_space>after<seq2seq4repair_space>profit[pips]" ) public int attemptCloseAfterProfit = 30 ; @ Configurable ( "Trailing<seq2seq4repair_space>step[pips]" ) public int trailingStep = 1 ; @ Configurable ( "Trailing<seq2seq4repair_space>stop<seq2seq4repair_space>trigger[pips]" ) public int trailingStopTrigger = 10 ; @ Configurable ( "Draw<seq2seq4repair_space>SL<seq2seq4repair_space>levels<seq2seq4repair_space>on<seq2seq4repair_space>chart" ) public boolean drawSl = true ; @ Configurable ( "" ) public Set < Period > periods = new HashSet < Period > ( Arrays . asList ( new Period [ ] { Period . DAILY } ) ) ; private static Color DARK_GREEN = Color . getHSBColor ( ( 102.0F // 360 ) , 1.0F , 0.4F ) ; private Map < IOrder , Double > slPrices = new ConcurrentHashMap < IOrder , Double > ( ) ; private int precision = 5 ; private Instrument instrument = Instrument . EURUSD ; private String AccountCurrency = "" ; private double Leverage ; private String AccountId = "" ; private double Equity ; private double UseofLeverage ; private int OverWeekendEndLeverage ; private int MarginCutLevel ; private boolean GlobalAccount ; private List < NotNLA . ZeroLine > zeroLines ; public void onStart ( IContext context ) throws JFException { } public void onStop ( ) throws JFException { } public void onTick ( Instrument instrument , ITick tick ) throws JFException { <START_BUG> if ( ( stopLossPips ) > 0 ) { <END_BUG> for ( IOrder order : engine . getOrders ( ) ) { updateTrailingStopLoss ( order , tick , trailingStopTrigger , trailingStep ) ; } } } public void onBar ( Instrument instrument , Period period , IBar askBar , IBar bidBar ) throws JFException { } public void updateTrailingStopLoss ( IOrder order , ITick tick , double trailingStopTrigger , double trailingStopStep ) throws JFException { } private void checkForClose ( IBar lastBar , IBar bar ) throws JFException { } private OrderCommand checkBars ( IBar lastBar , IBar bar ) throws JFException { } private OrderCommand checkBarsInverse ( IBar lastBar , IBar bar ) { } private void manageZeroLines ( Period period , IBar bar ) throws JFException { } private NotNLA . ZeroLine findClosestZL ( double price , Period period , IEngine . OrderCommand cmd ) { } private IBar getPreviousBar ( Period period , IBar bar ) throws JFException { } private NotNLA . Direction getBarDirection ( IBar bar ) { } private int getBarSizePips ( IBar bar ) { } protected void setTakeProfit ( Instrument instrument , double takeProfit ) throws JFException { } protected void setStopLoss ( Instrument instrument , double stopLoss ) throws JFException { } protected void closeAll ( ) throws JFException { } protected IOrder openOrder ( Instrument instrument , IEngine . OrderCommand command , double lot ) throws JFException { } protected IOrder openOrder ( Instrument instrument , IEngine . OrderCommand command , double lot , double stopLoss , double takeProfit ) throws JFException { } protected int positionsTotal ( Instrument instrument ) throws JFException { } protected double calculateProfit ( Instrument instrument , List < IOrder > orders ) throws JFException { } private double round ( double price , Instrument instr ) { } private double pip ( double pips , Instrument instr ) { } protected void print ( String msg ) { } protected void print ( String msg , Object ... args ) { } protected void printErr ( String err ) { } public void subscriptionInstrumentCheck ( Instrument instrument ) { } protected String getLabel ( Instrument instrument ) { } public void onMessage ( IMessage message ) throws JFException { } public void onAccount ( IAccount account ) throws JFException { } }

Fix:
if ( ( trailingStopTrigger ) > 0 ) {