|
From: Márcio V. d. S. <mv...@us...> - 2007-08-27 14:48:38
|
Update of /cvsroot/tail/Tail/src/java/net/sf/tail/strategy In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv4761/src/java/net/sf/tail/strategy Modified Files: IndicatorOverIndicatorStrategy.java IndicatorCrossedIndicatorStrategy.java SupportStrategy.java PipeEnterStrategy.java MinValueStarterStrategy.java DistanceBetweenIndicatorsStrategy.java AlwaysOperateStrategy.java ResistanceStrategy.java MinValueStopperStrategy.java JustBuyOnceStrategy.java Log Message: problemas com o cvs Index: PipeEnterStrategy.java =================================================================== RCS file: /cvsroot/tail/Tail/src/java/net/sf/tail/strategy/PipeEnterStrategy.java,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** PipeEnterStrategy.java 23 Aug 2007 12:47:26 -0000 1.8 --- PipeEnterStrategy.java 25 Aug 2007 12:30:00 -0000 1.9 *************** *** 26,32 **** public boolean shouldEnter(int index) { ! //if (crossUp.getValue(index)) ! // return true; ! if (crossDown.getValue(index)) return true; --- 26,32 ---- public boolean shouldEnter(int index) { ! // if (crossUp.getValue(index)) ! // return true; ! if (crossDown.getValue(index)) return true; *************** *** 35,50 **** public boolean shouldExit(int index) { ! //if (crossDown.getValue(index)) ! // return true; ! if (crossUp.getValue(index)) return true; return false; } - - public String getName(){ - return String.format("%s upper: %s lower: %s",this.getClass().getSimpleName(), crossUp.getName(), crossDown.getName()); - } } --- 35,50 ---- public boolean shouldExit(int index) { ! // if (crossDown.getValue(index)) ! // return true; ! if (crossUp.getValue(index)) return true; return false; } + public String getName() { + return String.format("%s upper: %s lower: %s", this.getClass().getSimpleName(), crossUp.getName(), crossDown + .getName()); + } } Index: AlwaysOperateStrategy.java =================================================================== RCS file: /cvsroot/tail/Tail/src/java/net/sf/tail/strategy/AlwaysOperateStrategy.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** AlwaysOperateStrategy.java 23 Aug 2007 12:47:26 -0000 1.5 --- AlwaysOperateStrategy.java 25 Aug 2007 12:30:00 -0000 1.6 *************** *** 1,5 **** package net.sf.tail.strategy; - public class AlwaysOperateStrategy extends AbstractStrategy { --- 1,4 ---- *************** *** 11,19 **** return true; } - ! public String getName(){ return this.getClass().getSimpleName(); ! } } --- 10,17 ---- return true; } ! public String getName() { return this.getClass().getSimpleName(); ! } } Index: IndicatorOverIndicatorStrategy.java =================================================================== RCS file: /cvsroot/tail/Tail/src/java/net/sf/tail/strategy/IndicatorOverIndicatorStrategy.java,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** IndicatorOverIndicatorStrategy.java 23 Aug 2007 12:47:26 -0000 1.7 --- IndicatorOverIndicatorStrategy.java 25 Aug 2007 12:30:00 -0000 1.8 *************** *** 3,7 **** import net.sf.tail.Indicator; ! public class IndicatorOverIndicatorStrategy extends AbstractStrategy{ private Indicator<Double> first; --- 3,7 ---- import net.sf.tail.Indicator; ! public class IndicatorOverIndicatorStrategy extends AbstractStrategy { private Indicator<Double> first; *************** *** 27,33 **** return false; } ! ! public String getName(){ ! return String.format("%s upper: %s lower: %s",this.getClass().getSimpleName(), first.getName(), second.getName()); } --- 27,34 ---- return false; } ! ! public String getName() { ! return String.format("%s upper: %s lower: %s", this.getClass().getSimpleName(), first.getName(), second ! .getName()); } Index: DistanceBetweenIndicatorsStrategy.java =================================================================== RCS file: /cvsroot/tail/Tail/src/java/net/sf/tail/strategy/DistanceBetweenIndicatorsStrategy.java,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** DistanceBetweenIndicatorsStrategy.java 23 Aug 2007 12:47:26 -0000 1.7 --- DistanceBetweenIndicatorsStrategy.java 25 Aug 2007 12:30:00 -0000 1.8 *************** *** 13,17 **** * */ ! public class DistanceBetweenIndicatorsStrategy extends AbstractStrategy{ Indicator<? extends Number> upper; --- 13,17 ---- * */ ! public class DistanceBetweenIndicatorsStrategy extends AbstractStrategy { Indicator<? extends Number> upper; *************** *** 46,53 **** return false; } - ! public String getName(){ ! return String.format("%s upper: %s lower: %s",this.getClass().getSimpleName(), upper.getName(), lower.getName()); } } --- 46,53 ---- return false; } ! public String getName() { ! return String.format("%s upper: %s lower: %s", this.getClass().getSimpleName(), upper.getName(), lower ! .getName()); } } Index: MinValueStarterStrategy.java =================================================================== RCS file: /cvsroot/tail/Tail/src/java/net/sf/tail/strategy/MinValueStarterStrategy.java,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** MinValueStarterStrategy.java 23 Aug 2007 12:47:26 -0000 1.9 --- MinValueStarterStrategy.java 25 Aug 2007 12:30:00 -0000 1.10 *************** *** 9,13 **** * venda nessa mesma {@link Strategy} */ ! public class MinValueStarterStrategy extends AbstractStrategy{ private Strategy strategy; --- 9,13 ---- * venda nessa mesma {@link Strategy} */ ! public class MinValueStarterStrategy extends AbstractStrategy { private Strategy strategy; *************** *** 34,39 **** } ! public String getName(){ ! return String.format("%s start: %i",this.getClass().getSimpleName(), start); } } --- 34,39 ---- } ! public String getName() { ! return String.format("%s start: %i", this.getClass().getSimpleName(), start); } } Index: JustBuyOnceStrategy.java =================================================================== RCS file: /cvsroot/tail/Tail/src/java/net/sf/tail/strategy/JustBuyOnceStrategy.java,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** JustBuyOnceStrategy.java 23 Aug 2007 12:47:26 -0000 1.6 --- JustBuyOnceStrategy.java 25 Aug 2007 12:30:00 -0000 1.7 *************** *** 1,13 **** package net.sf.tail.strategy; - - public class JustBuyOnceStrategy extends AbstractStrategy { private boolean operated = false; ! public boolean shouldEnter(int index) { ! if(!operated) ! { operated = true; return true; --- 1,10 ---- package net.sf.tail.strategy; public class JustBuyOnceStrategy extends AbstractStrategy { private boolean operated = false; ! public boolean shouldEnter(int index) { ! if (!operated) { operated = true; return true; *************** *** 19,27 **** return false; } ! ! public String getName(){ return this.getClass().getSimpleName(); } - } --- 16,23 ---- return false; } ! ! public String getName() { return this.getClass().getSimpleName(); } } Index: ResistanceStrategy.java =================================================================== RCS file: /cvsroot/tail/Tail/src/java/net/sf/tail/strategy/ResistanceStrategy.java,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** ResistanceStrategy.java 23 Aug 2007 12:47:26 -0000 1.8 --- ResistanceStrategy.java 25 Aug 2007 12:30:00 -0000 1.9 *************** *** 35,43 **** return strategy.shouldExit(index); } - - public String getName(){ - return String.format("%s resistance: %i strategy: %s",this.getClass().getSimpleName(), resistance ,strategy.getName()); - } } --- 35,43 ---- return strategy.shouldExit(index); } + public String getName() { + return String.format("%s resistance: %i strategy: %s", this.getClass().getSimpleName(), resistance, strategy + .getName()); + } } Index: SupportStrategy.java =================================================================== RCS file: /cvsroot/tail/Tail/src/java/net/sf/tail/strategy/SupportStrategy.java,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** SupportStrategy.java 23 Aug 2007 12:47:26 -0000 1.8 --- SupportStrategy.java 25 Aug 2007 12:30:00 -0000 1.9 *************** *** 34,40 **** return strategy.shouldExit(index); } ! ! public String getName(){ ! return String.format("%s suport: %i strategy: %s",this.getClass().getSimpleName(), support, strategy.getName()); } } --- 34,41 ---- return strategy.shouldExit(index); } ! ! public String getName() { ! return String ! .format("%s suport: %i strategy: %s", this.getClass().getSimpleName(), support, strategy.getName()); } } Index: MinValueStopperStrategy.java =================================================================== RCS file: /cvsroot/tail/Tail/src/java/net/sf/tail/strategy/MinValueStopperStrategy.java,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** MinValueStopperStrategy.java 23 Aug 2007 12:47:26 -0000 1.6 --- MinValueStopperStrategy.java 25 Aug 2007 12:30:00 -0000 1.7 *************** *** 12,16 **** * */ ! public class MinValueStopperStrategy extends AbstractStrategy{ private Strategy strategy; --- 12,16 ---- * */ ! public class MinValueStopperStrategy extends AbstractStrategy { private Strategy strategy; *************** *** 40,45 **** } ! public String getName(){ ! return String.format("%s stoper: %i",this.getClass().getSimpleName(), loss); } } --- 40,45 ---- } ! public String getName() { ! return String.format("%s stoper: %i", this.getClass().getSimpleName(), loss); } } Index: IndicatorCrossedIndicatorStrategy.java =================================================================== RCS file: /cvsroot/tail/Tail/src/java/net/sf/tail/strategy/IndicatorCrossedIndicatorStrategy.java,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** IndicatorCrossedIndicatorStrategy.java 23 Aug 2007 12:47:26 -0000 1.9 --- IndicatorCrossedIndicatorStrategy.java 25 Aug 2007 12:30:00 -0000 1.10 *************** *** 12,20 **** * */ ! public class IndicatorCrossedIndicatorStrategy extends AbstractStrategy{ - private final Indicator<Boolean> crossUp; ! private final Indicator<Boolean> crossDown; --- 12,19 ---- * */ ! public class IndicatorCrossedIndicatorStrategy extends AbstractStrategy { private final Indicator<Boolean> crossUp; ! private final Indicator<Boolean> crossDown; *************** *** 23,32 **** private Indicator<? extends Number> lower; - public IndicatorCrossedIndicatorStrategy(Indicator<? extends Number> upper, Indicator<? extends Number> lower) { this.upper = upper; this.lower = lower; ! crossUp = new CrossIndicator(upper,lower); ! crossDown = new CrossIndicator(lower,upper); } --- 22,30 ---- private Indicator<? extends Number> lower; public IndicatorCrossedIndicatorStrategy(Indicator<? extends Number> upper, Indicator<? extends Number> lower) { this.upper = upper; this.lower = lower; ! crossUp = new CrossIndicator(upper, lower); ! crossDown = new CrossIndicator(lower, upper); } *************** *** 38,45 **** return crossDown.getValue(index); } ! ! public String getName(){ return String.format("Cross %s over %s", upper.getName(), lower.getName()); ! } } --- 36,43 ---- return crossDown.getValue(index); } ! ! public String getName() { return String.format("Cross %s over %s", upper.getName(), lower.getName()); ! } } |