Skip to content

Convert Method (2)

Convert (1 of 2)

Summary

Converts an asset to another asset.

Signature

1
public abstract double Convert(double value, Asset from, Asset to)

Parameters

Name Type Description
value double The value you want to convert from Asset
from Asset Actual or current asset of the value
to Asset Target asset

Return Value

double

Declaring Type

cAlgo.API.Internals.IAssetConverter

Examples

1
 var convertResult = AssetConverter.Convert(10, "USD", "CAD");

Convert (2 of 2)

Summary

Converts an asset to another asset.

Signature

1
public abstract double Convert(double value, string from, string to)

Parameters

Name Type Description
value double The value you want to convert from Asset
from string Actual or current asset of the value
to string Target asset

Return Value

double

Declaring Type

cAlgo.API.Internals.IAssetConverter

Examples

1
 var convertResult = AssetConverter.Convert(10, "USD", "CAD");

Last update: January 30, 2023