Getting the PipSize from non Chart symbol
Created at 15 Mar 2022, 10:32
Getting the PipSize from non Chart symbol
15 Mar 2022, 10:32
Hi Guys,
Is it possible to get the PipSize for a different symbol than the chart the cBot's running on?
I've tried SymbolInfo.PipSize but i can't figure out the syntax. i.e.
foreach ( var sym in sym_names)
{
Print(SymbolInfo.PipSize);
}
Returns the error
"Error CS0120: An object reference is required for the non-static field, method, or property 'cAlgo.API.SymbolInfo.PipSize.get'"
I'm sure it's because i'm not referencing an object during the call of SymboInfo.PipSize, i.e. SymbolInfo.PipSize(sym), but i don't know the correct syntax to use.
Any advise would be appreciated
amusleh
15 Mar 2022, 10:50
Hi,
You can use Symbols.GetSymbol method and then you can use the returned Symbol instance PipSize, ex: cAlgo API Reference - Symbols Interface (ctrader.com)
@amusleh