Showing 49 of 55 total issues
Function modifyProtectedOrder
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
modifyProtectedOrder : function (order, price, takeProfitPrice, stopLossPrice, currentBidOrAskPrice, resolve, reject) {
Function placeOrder
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
placeOrder : function (amount, price, side, instrumentId, type, resolve, reject){
Function makeAccountRequest
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
makeAccountRequest : function (type, accountId, method, postData, resolve, reject){
Function calculatePositionSize
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
calculatePositionSize : function(instrumentId, risk, riskIsMoney, stopLossInPips, pipValue, equity){
Function validateOrderParams
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
validateOrderParams : function (type, side, price, currentBidOrAskPrice, takeProfitPrice, stopLossPrice) {
Function replacerListAsync
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
function replacerListAsync(match, p1, p2, p3, offset, string) {
Function replacerAsync
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
function replacerAsync(match, p1, p2, p3, offset, string) {
Function authenticateWithCredentials
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
authenticateWithCredentials : function (brokerId, login, password, externalId, resolve, reject) {
Function addOrModifyProtectionsForAccount
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
addOrModifyProtectionsForAccount : function (accountId, positionId, takeProfit, stopLoss, resolve, reject) {
Function placeLimitOrder
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
placeLimitOrder : function (amount, price, side, instrumentId, resolve, reject){
Function placeMarketOrderForAccount
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
placeMarketOrderForAccount : function (accountId, amount, side, instrumentId, resolve, reject){
Function placeStopOrder
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
placeStopOrder : function (amount, price, side, instrumentId, resolve, reject){
Function replacerSync
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
function replacerSync(match, p1, p2, p3, offset, string) {
Function getCandles
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
getCandles : function (instrumentId, from, to, aggregation, resolve, reject) {
Function makeProtectionRequest
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
makeProtectionRequest : function (method, positionId, newPrice, type, resolve, reject) {
Consider simplifying this complex logical expression. Open
Open
if((takeProfitPrice && side === "BUY" && takeProfitPrice < refPrice) ||
(takeProfitPrice && side === "SELL" && takeProfitPrice > refPrice)) {
throw "Take profit order is on the wrong side";
}
Consider simplifying this complex logical expression. Open
Open
if((stopLossPrice && side === "BUY" && stopLossPrice > refPrice) ||
(stopLossPrice && side === "SELL" && stopLossPrice < refPrice)) {
throw "Stop loss order is on the wrong side";
}
Function getOrderProtections
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
getOrderProtections : function(accountId, instrumentId, takeProfitPrice, stopLossPrice, priceForDistance) {
Function reducePositionToAmountForAccount
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
reducePositionToAmountForAccount : function (accountId, positionId, newAmount, resolve, reject){
Function addOrModifyStopLossForAccount
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
addOrModifyStopLossForAccount : function (accountId, positionId, newPrice, resolve, reject) {