Login Page - Create Account

Support Board


Date/Time: Wed, 15 Jan 2025 16:20:58 +0000



Post From: How to find symbol for option

[2017-06-26 19:57:04]
User972044 - Posts: 154
Well actually it does. For the study function sc.GetBasicSymbolData(Symbol,BasicSymbolData, true), the first parameter "Symbol" can only take const char*. I tried to pass a C++ string to it and I received an compiling error saying that the parameter is of the wrong type and cannot be converted. I had to use a const char*; I couldn't even use SCSTRING. So maybe for s_SCNewOrder::Symbol, it does not matter but for the sc.GetBasicSymbolData(Symbol,BasicSymbolData, true) function, it does, that's why I asked.

I actually would love it that it does not matter either for that "Symbol" parameter for the sc.GetBasicSymbolData(Symbol,BasicSymbolData, true) study function because I wanted to pass a whole bunch of option symbols with different strike price to that function to get different prices and I couldn't; I had to use const char* and please correct me if I am wrong, const char* is a pointer to an immutable variable, a constant that cannot be changed. I had to use a different constant for each different option just because of the different strike price or choose to be stuck with just one option symbol. So if you tell me that const char* is the same as any text string that's extracted with the c_str() method from the C++ string class, then I would love to try it with the sc.GetBasicSymbolData(Symbol,BasicSymbolData, true) study function.

Anyway, thanks for the reply.
Date Time Of Last Edit: 2017-06-26 22:12:45