Support Board
Date/Time: Sun, 12 Jan 2025 12:41:55 +0000
Post From: sc.RoundTurnCommission ignored
[2017-02-10 08:40:56] |
DabbaDo - Posts: 148 |
I asked this question at ASCIL access to symbol's Round Trip Commission | Post: 110113 and then realized that thread had been marked User Discussion. With ESH7 (connected to Gain) sc.RoundTurnCommission is always 0. But with ESH17 (connected to SC Data - All Services) sc.RoundTurnCommission reports the commission properly (as set in Edit Global Symbols). In my GlobalSymbolSettings.xml I have these: <settings> <service-code>scdataallservices</service-code> <symbol>ES?##</symbol> <use-pattern-matching-characters>true</use-pattern-matching-characters> <contract-months>HMUZ</contract-months> <description>E-Mini S&P 500 Index (ES) - GBLX</description> <category>Futures - Indices</category> <value-format-code>2</value-format-code> <tick-size>0.25</tick-size> <currency-value-per-tick>12.5</currency-value-per-tick> <error-filtering>true</error-filtering> <time-zone>EST-05EDT+01,M3.2.0/02:00,M11.1.0/02:00</time-zone> <intraday-start-time>16:15:00</intraday-start-time> <intraday-stop-time>16:14:59</intraday-stop-time> <default-order-quantity>1</default-order-quantity> <rt-commission>4.08</rt-commission> <rollover-method>Method3</rollover-method> <rollover-input-1>8</rollover-input-1> <rollover-input-2>3</rollover-input-2> <sc-data-symbol>ES?##</sc-data-symbol> <sc-data-symbol-multiplier>0.01</sc-data-symbol-multiplier> <sc-data-srvcode>cme</sc-data-srvcode> </settings> <settings> <service-code>DTCSubInstance</service-code> <symbol>ES?#</symbol> <historical-chart-symbol>ES?##</historical-chart-symbol> <use-pattern-matching-characters>true</use-pattern-matching-characters> <contract-months>HMUZ</contract-months> <description>E-mini S&P 500 - CME</description> <category>Futures</category> <value-format-code>2</value-format-code> <tick-size>0.25</tick-size> <currency-value-per-tick>12.5</currency-value-per-tick> <error-filtering>true</error-filtering> <default-order-quantity>1</default-order-quantity> <rt-commission>4.08</rt-commission> <rollover-method>Method3</rollover-method> <rollover-input-1>8</rollover-input-1> <rollover-input-2>3</rollover-input-2> <sc-data-symbol>ES?##</sc-data-symbol> <sc-data-symbol-multiplier>0.01</sc-data-symbol-multiplier> <sc-data-srvcode>cme</sc-data-srvcode> <use-patch-data>true</use-patch-data> <patch-data-source>cme</patch-data-source> <patch-data-symbol>ES?##</patch-data-symbol> <patch-data-multiplier>0.01</patch-data-multiplier> <patch-data-use-sc-exchange-data-servers>true</patch-data-use-sc-exchange-data-servers> <maintain-server-data-service-codes>oec,scoec</maintain-server-data-service-codes> </settings> Test code: int& isMessageLogged = sc.GetPersistentInt(1); if (sc.SetDefaults) { sc.GraphName = "Test Commission"; return; } if (!isMessageLogged) { SCString message; message.Format("For symbol=%s RoundTurnCommission=%f", sc.Symbol.GetChars(), sc.RoundTurnCommission); sc.AddMessageToLog(message, 1); isMessageLogged = 1; sc.SetPersistentInt(1, isMessageLogged); } |