         }
     }
     */
-    func getOptionsCoin(_ coin: Int) -> Bool {
-        return UserDefaults.standard.integer(forKey: "coin" + String(coin)) != -1
-    }
+    
     /*
     func setOptionsCoin(_ sender: NSMenuItem) {
         if (sender.state == NSOnState) {

        startAtLogin.state = UserDefaults.standard.bool(forKey: "preferencesStartAtLogin") == true ? NSOnState : NSOffState
    }
    
    func initMenus() {
        self.stopTicker()
        self.statusMenu.removeAllItems()

        self.statusMenu.addItem(quit)
    }
    
    /**
     * Get coin data by coin unit or tag
     *
     * @param Any coin unit or tag
     * @return Coin? coin
     */
    func getCoin(_ sender: Any) -> Coin? {
        if (sender is Int) {
            let tag: Int = sender as! Int
            
            for coin in self.coins {
                if (coin.tag == tag) {
                    return coin
                }
            }
        } else {
            let unit: String = sender as! String
            
            for coin in self.coins {
                if (coin.unit == unit) {
                    return coin
                }
            }
        }
        
        return nil
    }
    
    /**
     * Get market data by market name or tag
     *
     * @param Any market name or tag
     * @return Market? market
     */
    func getMarket(_ sender: Any) -> Market? {
        if (sender is Int) {
            let tag: Int = sender as! Int
            
            for market in self.markets {
                if (market.tag == tag) {
                    return market
                }
            }
        } else {
            let name: String = sender as! String
            
            for market in self.markets {
                if (market.name == name) {
                    return market
                }
            }
        }
        
        return nil
    }
    
    /**
     * Get ticker selected market by coin unit
     *
     * @param String coin
     * @return Market? market
     */
    func getSelectedMarket(_ unit: String) -> Market? {
        if (unit == "ETH" || unit == "BTC") {
            return self.getMarket("Korbit")
        }
        let coin: Coin? = self.getCoin(unit)
        if (coin == nil) {
            return nil
        } else {
            let selectedMarket: String? = UserDefaults.standard.string(forKey: "Selected" + coin!.unit)
            if (selectedMarket == nil) {
                return nil
            } else {
                let market: Market? = self.getMarket(selectedMarket!)
                if (market == nil || self.isMarketEnabled(market!.name) == false) {
                    return nil
                } else {
                    return market
                }
            }
        }
    }
    
    /**
     * Set selected market
     *
     * @param NSMenuItem sender
     * @return nil
     */
    func setSelectedMarket(_ sender: NSMenuItem) {
        
    }
    
    /**
     * Check coin enabled by coin unit
     *
     * @param String coin unit
     * @return Bool isEnabled
     */
    func isCoinEnabled(_ unit: String) -> Bool {
        let coin: Coin? = self.getCoin(unit)
        if (coin == nil) {
            return false
        } else {
            let isEnabled = UserDefaults.standard.object(forKey: "is" + coin!.unit + "Enabled")
            
            if (isEnabled == nil) {
                UserDefaults.standard.set(true, forKey: "is" + coin!.unit + "Enabled")
                return true
            } else {
                return isEnabled as! Bool
            }
        }
    }
    
    /**
     * Check market enabled by market name
     *
     * @param String market name
     * @return Bool isEnabled
     */
    func isMarketEnabled(_ name: String) -> Bool {
        let market: Market? = self.getMarket(name)
        if (market == nil) {
            return false
        } else {
            let isEnabled = UserDefaults.standard.object(forKey: "is" + market!.name + "Enabled")
            
            if (isEnabled == nil) {
                UserDefaults.standard.set(true, forKey: "is" + market!.name + "Enabled")
                return true
            } else {
                return isEnabled as! Bool
            }
        }
    }
    
    /*
    func setMarket(_ sender: NSMenuItem) {
        if (sender.state == NSOffState) {
            let coin = sender.tag / 1000
