Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EventPrice changes. Delete barPrice, and replace for priceData in 4.x.x #67

Open
pnzr00t opened this issue Apr 17, 2024 · 1 comment
Open

Comments

@pnzr00t
Copy link

pnzr00t commented Apr 17, 2024

In version 3.8.0 you have this data structure, in which BarPrice == Double

// MARK: -
public enum EventPrices {
    case barPrice(BarPrice)
    case barPrices(BarPrices)
    case none
}

In version 4.0.0 you change structure to this

// MARK: -
public enum EventPrices {
    case barData(BarData)
    case lineData(LineData)
    case none
}

where

// MARK: -
public struct BarData: BarSeriesData {
    
    public var time: Time
    public var open: Double?
    public var high: Double?
    public var low: Double?
    public var close: Double?
    public var color: ChartColor?
    
    public init(time: Time, open: Double?, high: Double?, low: Double?, close: Double?, color: ChartColor? = nil) {
        self.time = time
        self.open = open
        self.high = high
        self.low = low
        self.close = close
        self.color = color
    }
    
}

How may i mapping case barPrice(BarPrice) -> case barData(BarData)?

@pnzr00t
Copy link
Author

pnzr00t commented Apr 19, 2024

Screenshot 2024-04-19 at 09 54 57

As i see in diff of 4.x.x. case barPrice(BarPrice) is case lineData(LineData) now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant