|
|
|
@ -303,7 +303,7 @@ public class ScheduledTask {
|
|
|
|
|
}
|
|
|
|
|
}else { //开仓方式为卖 则平仓方式为买 先获取买价
|
|
|
|
|
Double buyPic = forexMarketData.getBuyPic();
|
|
|
|
|
if(stopLoss!=-1 && buyPic<=stopLoss){
|
|
|
|
|
if(stopLoss!=-1 && buyPic>=stopLoss){
|
|
|
|
|
Double margin = takeStashController.startUSDMarginNeed(trainingId, memberId, 0, tradingCode, buySellType, transactionVolume);
|
|
|
|
|
if (margin==0.0){
|
|
|
|
|
redisUtil.del("trainingId_"+trainingId+"_stashId_"+stashId);
|
|
|
|
@ -313,7 +313,7 @@ public class ScheduledTask {
|
|
|
|
|
takeStashController.updateMemberAndTakeStash(memberId,stashId,profitLoss,margin,stopLoss);
|
|
|
|
|
redisUtil.del("trainingId_"+trainingId+"_stashId_"+stashId);
|
|
|
|
|
}
|
|
|
|
|
if(stopWin!=-1 && buyPic>=stopWin){
|
|
|
|
|
if(stopWin!=-1 && buyPic<=stopWin){
|
|
|
|
|
Double margin = takeStashController.startUSDMarginNeed(trainingId, memberId, 0, tradingCode, buySellType, transactionVolume);
|
|
|
|
|
if (margin==0.0){
|
|
|
|
|
redisUtil.del("trainingId_"+trainingId+"_stashId_"+stashId);
|
|
|
|
@ -349,7 +349,7 @@ public class ScheduledTask {
|
|
|
|
|
}
|
|
|
|
|
}else { //开仓方式为卖 则平仓方式为买 先获取买价
|
|
|
|
|
Double buyPic = forexMarketData.getBuyPic();
|
|
|
|
|
if(stopLoss!=-1 && buyPic<=stopLoss){
|
|
|
|
|
if(stopLoss!=-1 && buyPic>=stopLoss){
|
|
|
|
|
Double margin = takeStashController.endUSDMarginNeed( trainingId, memberId,0 , tradingCode, buySellType, transactionVolume, priceTransaction);
|
|
|
|
|
if (margin==0.0){
|
|
|
|
|
redisUtil.del("trainingId_"+trainingId+"_stashId_"+stashId);
|
|
|
|
@ -359,7 +359,7 @@ public class ScheduledTask {
|
|
|
|
|
takeStashController.updateMemberAndTakeStash(memberId,stashId,profitLoss,margin,stopLoss);
|
|
|
|
|
redisUtil.del("trainingId_"+trainingId+"_stashId_"+stashId);
|
|
|
|
|
}
|
|
|
|
|
if(stopWin!=-1 && buyPic>=stopWin){
|
|
|
|
|
if(stopWin!=-1 && buyPic<=stopWin){
|
|
|
|
|
Double margin = takeStashController.endUSDMarginNeed( trainingId, memberId,0 , tradingCode, buySellType, transactionVolume, priceTransaction);
|
|
|
|
|
if (margin==0.0){
|
|
|
|
|
redisUtil.del("trainingId_"+trainingId+"_stashId_"+stashId);
|
|
|
|
|