Login Page - Create Account

Support Board


Date/Time: Thu, 02 May 2024 23:30:07 +0000



Automated Trading AAPL options

View Count: 1064

[2015-12-23 03:24:23]
User713273 - Posts: 409
Trade Activity Log file read result: 2015 records inserted. 0 records filtered. | 2015-12-22 07:24:06
Trade Activity Log file date-time limits: Sim records date-time limit is 2015-12-07 00:00:00. Non-sim records date-time limit is 2015-09-20 00:00:00. Non-sim fill record date-time limit is 2015-03-18 00:00:00. | 2015-12-22 07:24:06
Interactive Brokers | Sent reqOpenOrders request | 2015-12-22 07:25:13
Interactive Brokers | Sent reqOpenOrders request | 2015-12-22 07:36:15
Auto-trade: AAPL [M] 1 Sec #1 | DefaultSpreadsheetStudy | SellEntry signal is ignored because a Short position exists or working order quantities indicate a potential Short position, and Multiple Entries in Same Direction is not enabled. Position quantity: -1. Position with working orders quantity: -1 | Bar Start Time: 2015-12-22 07:43:51 | 2015-12-22 07:43:48
Auto-trade: AAPL [M] 1 Sec #1 | DefaultSpreadsheetStudy | Buy Entry reversal order processed. Flatten quantity: 1. New order quantity: 1 | Bar Start Time: 2015-12-22 07:55:05 | 2015-12-22 07:55:02
Interactive Brokers | Sent reqOpenOrders request | 2015-12-22 07:55:17
Auto-trade: AAPL [M] 1 Sec #1 | DefaultSpreadsheetStudy | SellEntry reversal order processed. Flatten quantity: 1. New order quantity: 1 | Bar Start Time: 2015-12-22 07:59:47 | 2015-12-22 07:59:45
Interactive Brokers | Sent reqOpenOrders request | 2015-12-22 08:00:00
Auto-trade: AAPL [M] 1 Sec #1 | DefaultSpreadsheetStudy | SellEntry signal is ignored because a Short position exists or working order quantities indicate a potential Short position, and Multiple Entries in Same Direction is not enabled. Position quantity: -1. Position with working orders quantity: -1 | Bar Start Time: 2015-12-22 08:04:40 | 2015-12-22 08:04:38
Auto-trade: AAPL [M] 1 Sec #1 | DefaultSpreadsheetStudy | Buy Entry reversal order processed. Flatten quantity: 1. New order quantity: 1 | Bar Start Time: 2015-12-22 08:31:40 | 2015-12-22 08:31:38
Trading Message from IB: The price does not conform to the minimum price variation for this contract. Error Code: 110. ServiceOrderID: 19. | 2015-12-22 08:31:38
Trading Message from IB: The price does not conform to the minimum price variation for this contract. Error Code: 110. ServiceOrderID: 21. | 2015-12-22 08:31:38
Interactive Brokers | Sent reqOpenOrders request | 2015-12-22 08:31:53
Error sending order to server. | Symbol: AAPL-OPT-20151224-107-C-SMART-100-USD | TradeAccount: DU200382 | InternalOrderID: 34857 | 2015-12-22 08:31:53 *
Error sending order to server. | Symbol: AAPL-OPT-20151224-107-C-SMART-100-USD | TradeAccount: DU200382 | InternalOrderID: 34859 | 2015-12-22 08:31:53 *
Auto-trade: AAPL [M] 1 Sec #1 | DefaultSpreadsheetStudy | SellEntry reversal order processed. Flatten quantity: 1. New order quantity: 1 | Bar Start Time: 2015-12-22 08:48:26 | 2015-12-22 08:48:24
Interactive Brokers | Sent reqOpenOrders request | 2015-12-22 08:48:39
Auto-trade: AAPL [M] 1 Sec #1 | DefaultSpreadsheetStudy | SellEntry reversal order processed. Flatten quantity: 1. New order quantity: 1 | Bar Start Time: 2015-12-22 08:53:04 | 2015-12-22 08:53:02
Interactive Brokers | Sent reqOpenOrders request | 2015-12-22 08:53:17
Auto-trade: AAPL [M] 1 Sec #1 | DefaultSpreadsheetStudy | Buy Entry reversal order processed. Flatten quantity: 3. New order quantity: 1 | Bar Start Time: 2015-12-22 09:09:31 | 2015-12-22 09:09:29
Interactive Brokers | Sent reqOpenOrders request | 2015-12-22 09:09:44
Auto-trade: AAPL [M] 1 Sec #1 | DefaultSpreadsheetStudy | SellEntry reversal order processed. Flatten quantity: 1. New order quantity: 1 | Bar Start Time: 2015-12-22 09:24:17 | 2015-12-22 09:24:15
Interactive Brokers | Sent reqOpenOrders request | 2015-12-22 09:24:30
Auto-trade: AAPL [M] 1 Sec #1 | DefaultSpreadsheetStudy | Buy Entry reversal order processed. Flatten quantity: 1. New order quantity: 1 | Bar Start Time: 2015-12-22 09:35:36 | 2015-12-22 09:35:33
Auto-trade: AAPL [M] 1 Sec #1 | DefaultSpreadsheetStudy | BuyEntry signal is ignored because a Long position exists or working order quantities indicate a potential Long position, and Multiple Entries in Same Direction is not enabled. Position quantity: 1. Position with working orders quantity: 1 | Bar Start Time: 2015-12-22 09:35:36 | 2015-12-22 09:35:34
Interactive Brokers | Sent reqOpenOrders request | 2015-12-22 09:35:48
Auto-trade: AAPL [M] 1 Sec #1 | DefaultSpreadsheetStudy | BuyEntry signal is ignored because a Long position exists or working order quantities indicate a potential Long position, and Multiple Entries in Same Direction is not enabled. Position quantity: 1. Position with working orders quantity: 1 | Bar Start Time: 2015-12-22 09:39:08 | 2015-12-22 09:39:06
Auto-trade: AAPL [M] 1 Sec #1 | DefaultSpreadsheetStudy | BuyEntry signal is ignored because a Long position exists or working order quantities indicate a potential Long position, and Multiple Entries in Same Direction is not enabled. Position quantity: 1. Position with working orders quantity: 1 | Bar Start Time: 2015-12-22 09:44:12 | 2015-12-22 09:44:10
Auto-trade: AAPL [M] 1 Sec #1 | DefaultSpreadsheetStudy | BuyEntry signal is ignored because a Long position exists or working order quantities indicate a potential Long position, and Multiple Entries in Same Direction is not enabled. Position quantity: 1. Position with working orders quantity: 1 | Bar Start Time: 2015-12-22 09:46:34 | 2015-12-22 09:46:32
Auto-trade: AAPL [M] 1 Sec #1 | DefaultSpreadsheetStudy | BuyEntry signal is ignored because a Long position exists or working order quantities indicate a potential Long position, and Multiple Entries in Same Direction is not enabled. Position quantity: 1. Position with working orders quantity: 1 | Bar Start Time: 2015-12-22 10:00:01 | 2015-12-22 09:59:58
Auto-trade: AAPL [M] 1 Sec #1 | DefaultSpreadsheetStudy | SellEntry reversal order processed. Flatten quantity: 1. New order quantity: 1 | Bar Start Time: 2015-12-22 11:01:15 | 2015-12-22 11:01:13
Interactive Brokers | Sent reqOpenOrders request | 2015-12-22 11:01:28
Auto-trade: AAPL [M] 1 Sec #1 | DefaultSpreadsheetStudy | SellEntry signal is ignored because a Short position exists or working order quantities indicate a potential Short position, and Multiple Entries in Same Direction is not enabled. Position quantity: -1. Position with working orders quantity: -1 | Bar Start Time: 2015-12-22 11:09:23 | 2015-12-22 11:09:21
Auto-trade: AAPL [M] 1 Sec #1 | DefaultSpreadsheetStudy | SellEntry signal is ignored because a Short position exists or working order quantities indicate a potential Short position, and Multiple Entries in Same Direction is not enabled. Position quantity: -1. Position with working orders quantity: -1 | Bar Start Time: 2015-12-22 11:11:31 | 2015-12-22 11:11:29
Interactive Brokers | Sent reqOpenOrders request | 2015-12-22 11:24:06
Auto-trade: AAPL [M] 1 Sec #1 | DefaultSpreadsheetStudy | SellEntry signal is ignored because a Short position exists or working order quantities indicate a potential Short position, and Multiple Entries in Same Direction is not enabled. Position quantity: -1. Position with working orders quantity: -1 | Bar Start Time: 2015-12-22 11:24:22 | 2015-12-22 11:24:19
Auto-trade: AAPL [M] 1 Sec #1 | DefaultSpreadsheetStudy | SellEntry signal is ignored because a Short position exists or working order quantities indicate a potential Short position, and Multiple Entries in Same Direction is not enabled. Position quantity: -1. Position with working orders quantity: -1 | Bar Start Time: 2015-12-22 11:43:38 | 2015-12-22 11:43:36
Auto-trade: AAPL [M] 1 Sec #1 | DefaultSpreadsheetStudy | Buy Entry reversal order processed. Flatten quantity: 1. New order quantity: 1 | Bar Start Time: 2015-12-22 11:48:49 | 2015-12-22 11:48:47
Trading Message from IB: The price does not conform to the minimum price variation for this contract. Error Code: 110. ServiceOrderID: 37. | 2015-12-22 11:48:48
Interactive Brokers | Sent reqOpenOrders request | 2015-12-22 11:49:03
Error sending order to server. | Symbol: AAPL-OPT-20151224-107-C-SMART-100-USD | TradeAccount: DU200382 | InternalOrderID: 34875 | 2015-12-22 11:49:03 *
Auto-trade: AAPL [M] 1 Sec #1 | DefaultSpreadsheetStudy | SellEntry reversal order processed. Flatten quantity: 1. New order quantity: 1 | Bar Start Time: 2015-12-22 13:41:31 | 2015-12-22 13:41:29
Trade Order Error - IB open order update. Order reported as Inactive. Internal Order ID: 34876. Service Order ID: 39. Symbol: AAPL | 2015-12-22 13:41:29 *
Trading Message from IB: Order rejected - reason:Account is closed. Error Code: 201. ServiceOrderID: 39. | 2015-12-22 13:41:29
Trade Order Error - IB open order update. Order reported as Inactive. Internal Order ID: 34877. Service Order ID: 40. Symbol: AAPL | 2015-12-22 13:41:30 *
Trading Message from IB: Order rejected - reason:Account is closed. Error Code: 201. ServiceOrderID: 40. | 2015-12-22 13:41:30
Interactive Brokers | Sent reqOpenOrders request | 2015-12-22 13:41:44
Auto-trade: AAPL [M] 1 Sec #1 | DefaultSpreadsheetStudy | SellEntry reversal order processed. Flatten quantity: 1. New order quantity: 1 | Bar Start Time: 2015-12-22 13:42:54 | 2015-12-22 13:42:52
Trade Order Error - IB open order update. Order reported as Inactive. Internal Order ID: 34878. Service Order ID: 41. Symbol: AAPL | 2015-12-22 13:42:53 *
Trading Message from IB: Order rejected - reason:Account is closed. Error Code: 201. ServiceOrderID: 41. | 2015-12-22 13:42:53
Trade Order Error - IB open order update. Order reported as Inactive. Internal Order ID: 34879. Service Order ID: 42. Symbol: AAPL | 2015-12-22 13:42:53 *
Trading Message from IB: Order rejected - reason:Account is closed. Error Code: 201. ServiceOrderID: 42. | 2015-12-22 13:42:53
Auto-trade: AAPL [M] 1 Sec #1 | DefaultSpreadsheetStudy | SellEntry reversal order processed. Flatten quantity: 1. New order quantity: 1 | Bar Start Time: 2015-12-22 13:42:56 | 2015-12-22 13:42:54
Trade Order Error - IB open order update. Order reported as Inactive. Internal Order ID: 34880. Service Order ID: 43. Symbol: AAPL | 2015-12-22 13:42:55 *
Trading Message from IB: Order rejected - reason:Account is closed. Error Code: 201. ServiceOrderID: 43. | 2015-12-22 13:42:55
Trade Order Error - IB open order update. Order reported as Inactive. Internal Order ID: 34881. Service Order ID: 44. Symbol: AAPL | 2015-12-22 13:42:55 *
Trading Message from IB: Order rejected - reason:Account is closed. Error Code: 201. ServiceOrderID: 44. | 2015-12-22 13:42:55
Interactive Brokers | Sent reqOpenOrders request | 2015-12-22 13:43:09

2015-12-22 07:36:00  2015-12-22 07:36:00  AAPL  Filled  34849  Market  Sell  Open  1  107.10  0.00  1  107.10  0  Day    12  DU200382  0  0  IB order status update        0.00  0.00
2015-12-22 07:55:02  2015-12-22 07:55:02  AAPL  Filled  34850  Market  Buy  Close  1  106.89  0.00  1  106.89  0  Day    13  DU200382  0  0  IB order status update        0.00  0.00
2015-12-22 07:55:02  2015-12-22 07:55:02  AAPL  Filled  34851  Market  Buy  Close  1  106.89  0.00  1  106.89  0  Day    14  DU200382  0  0  IB order status update        0.00  0.00
2015-12-22 07:59:45  2015-12-22 07:59:48  AAPL  Filled  34852  Market  Sell  Close  1  106.66  0.00  1  106.66  0  Day    15  DU200382  0  0  IB order status update        0.00  0.00
2015-12-22 07:59:45  2015-12-22 07:59:48  AAPL  Filled  34853  Market  Sell  Close  1  106.66  0.00  1  106.66  0  Day    16  DU200382  0  0  IB order status update        0.00  0.00
2015-12-22 08:31:38  2015-12-22 08:31:38  AAPL  Filled  34854  Market  Buy  Close  1  107.06  0.00  1  107.06  0  Day    17  DU200382  0  0  IB order status update        0.00  0.00
2015-12-22 08:31:38  2015-12-22 08:31:38  AAPL  Filled  34855  Market  Buy  Close  1  107.06  0.00  1  107.06  0  Day    18  DU200382  0  0  IB order status update        0.00  0.00
2015-12-22 08:31:38  2015-12-22 08:31:53  AAPL-OPT-20151224-107-C-SMART-100-USD  Canceled  34857  Limit  Sell  Close  113  0.96800  0.00000  0  0.00000  0  Good till Canceled    19  DU200382  0  0  Canceling due to no order update from server        0.00000  0.00000
2015-12-22 08:31:38  2015-12-22 08:31:39  AAPL-OPT-20151224-107-C-SMART-100-USD  Filled  34856  Market  Buy  Open  113  0.00000  0.00000  113  0.89000  0  Good till Canceled    20  DU200382  0  0  IB order status update        0.00000  0.00000
2015-12-22 08:31:38  2015-12-22 08:31:53  AAPL-OPT-20151224-107-C-SMART-100-USD  Canceled  34859  Limit  Sell  Close  113  0.96800  0.00000  0  0.00000  0  Good till Canceled    21  DU200382  0  0  Canceling due to no order update from server        0.00000  0.00000
2015-12-22 08:31:38  2015-12-22 08:31:40  AAPL-OPT-20151224-107-C-SMART-100-USD  Filled  34858  Market  Buy  Open  113  0.00000  0.00000  113  0.89159  0  Good till Canceled    22  DU200382  0  0  IB order status update        0.00000  0.00000
2015-12-22 08:48:24  2015-12-22 08:48:24  AAPL  Filled  34860  Market  Sell  Close  1  106.96  0.00  1  106.96  0  Day    23  DU200382  0  0  IB order status update        0.00  0.00
2015-12-22 08:48:24  2015-12-22 08:48:25  AAPL  Filled  34861  Market  Sell  Close  1  106.96  0.00  1  106.96  0  Day    24  DU200382  0  0  IB order status update        0.00  0.00
2015-12-22 08:53:02  2015-12-22 08:53:02  AAPL  Filled  34862  Market  Sell  Close  1  106.88  0.00  1  106.88  0  Day    25  DU200382  0  0  IB order status update        0.00  0.00
2015-12-22 08:53:02  2015-12-22 08:53:03  AAPL  Filled  34863  Market  Sell  Close  1  106.88  0.00  1  106.88  0  Day    26  DU200382  0  0  IB order status update        0.00  0.00
2015-12-22 09:09:29  2015-12-22 09:09:31  AAPL  Filled  34864  Market  Buy  Close  3  106.82  0.00  3  106.83  0  Day    27  DU200382  0  0  IB order status update        0.00  0.00
2015-12-22 09:09:29  2015-12-22 09:09:31  AAPL  Filled  34865  Market  Buy  Close  1  106.82  0.00  1  106.83  0  Day    28  DU200382  0  0  IB order status update        0.00  0.00
2015-12-22 09:24:15  2015-12-22 09:24:15  AAPL  Filled  34866  Market  Sell  Close  1  106.71  0.00  1  106.71  0  Day    29  DU200382  0  0  IB order status update        0.00  0.00
2015-12-22 09:24:15  2015-12-22 09:24:15  AAPL  Filled  34867  Market  Sell  Close  1  106.71  0.00  1  106.70  0  Day    30  DU200382  0  0  IB order status update        0.00  0.00
2015-12-22 09:35:33  2015-12-22 09:35:33  AAPL  Filled  34868  Market  Buy  Close  1  106.92  0.00  1  106.91  0  Day    31  DU200382  0  0  IB order status update        0.00  0.00
2015-12-22 09:35:33  2015-12-22 09:35:33  AAPL  Filled  34869  Market  Buy  Close  1  106.92  0.00  1  106.91  0  Day    32  DU200382  0  0  IB order status update        0.00  0.00
2015-12-22 11:01:13  2015-12-22 11:01:13  AAPL  Filled  34870  Market  Sell  Close  1  107.25  0.00  1  107.25  0  Day    33  DU200382  0  0  IB order status update        0.00  0.00
2015-12-22 11:01:13  2015-12-22 11:01:13  AAPL  Filled  34871  Market  Sell  Close  1  107.25  0.00  1  107.25  0  Day    34  DU200382  0  0  IB order status update        0.00  0.00
2015-12-22 11:48:47  2015-12-22 11:48:48  AAPL  Filled  34872  Market  Buy  Close  1  107.30  0.00  1  107.29  0  Day    35  DU200382  0  0  IB order status update        0.00  0.00
2015-12-22 11:48:47  2015-12-22 11:48:48  AAPL  Filled  34873  Market  Buy  Close  1  107.30  0.00  1  107.29  0  Day    36  DU200382  0  0  IB order status update        0.00  0.00
2015-12-22 11:48:47  2015-12-22 11:49:03  AAPL-OPT-20151224-107-C-SMART-100-USD  Canceled  34875  Limit  Sell  Close  116  0.94600  0.00000  0  0.00000  0  Good till Canceled    37  DU200382  0  0  Canceling due to no order update from server        0.00000  0.00000
2015-12-22 11:48:47  2015-12-22 11:48:51  AAPL-OPT-20151224-107-C-SMART-100-USD  Filled  34874  Market  Buy  Open  116  0.00000  0.00000  116  0.87741  0  Good till Canceled    38  DU200382  0  0  IB order status update        0.00000  0.00000
2015-12-22 13:41:29  2015-12-22 13:41:29  AAPL  Error  34876  Market  Sell  Close  1  107.18  0.00  0  0.00  0  Day    39  DU200382  0  0  IB order status update. Order reported as Inactive        0.00  0.00
2015-12-22 13:41:29  2015-12-22 13:41:30  AAPL  Error  34877  Market  Sell  Close  1  107.18  0.00  0  0.00  0  Day    40  DU200382  0  0  IB order status update. Order reported as Inactive        0.00  0.00
2015-12-22 13:42:52  2015-12-22 13:42:53  AAPL  Error  34878  Market  Sell  Close  1  107.12  0.00  0  0.00  0  Day    41  DU200382  0  0  IB order status update. Order reported as Inactive        0.00  0.00
2015-12-22 13:42:52  2015-12-22 13:42:53  AAPL  Error  34879  Market  Sell  Close  1  107.12  0.00  0  0.00  0  Day    42  DU200382  0  0  IB order status update. Order reported as Inactive        0.00  0.00
2015-12-22 13:42:54  2015-12-22 13:42:55  AAPL  Error  34880  Market  Sell  Close  1  107.11  0.00  0  0.00  0  Day    43  DU200382  0  0  IB order status update. Order reported as Inactive        0.00  0.00
2015-12-22 13:42:54  2015-12-22 13:42:55  AAPL  Error  34881  Market  Sell  Close  1  107.11  0.00  0  0.00  0  Day    44  DU200382  0  0  IB order status update. Order reported as Inactive


Hi having discernible differences in trade service log vs trade orders and positions log. Using ACSIL code and buying via K & M columns using data parameters set from said spreadsheet.
[2015-12-23 03:54:06]
Sierra Chart Engineering - Posts: 104368
What is the question?
Sierra Chart Support - Engineering Level

Your definitive source for support. Other responses are from users. Try to keep your questions brief and to the point. Be aware of support policy:
https://www.sierrachart.com/index.php?l=PostingInformation.php#GeneralInformation

For the most reliable, advanced, and zero cost futures order routing, *change* to the Teton service:
Sierra Chart Teton Futures Order Routing
[2015-12-23 04:02:21]
User713273 - Posts: 409
Yes, sorry, have written a great deal of using ACSIL language. Im having an issue connecting but/sell entries in accordance with those columns. I would like to share parts of that code and distinguish the issues and resolve them.
Private File
[2015-12-23 04:27:29]
User713273 - Posts: 409
sorry update version attached
Private File
Attachment Deleted.
[2015-12-23 09:11:44]
Sierra Chart Engineering - Posts: 104368
If you want to know what particular order is associated with an order submission from a particular chart, automated trading study, at a particular time, refer to the Trade Activity Log:
https://www.sierrachart.com/index.php?page=doc/doc_TradeActivityLog.php#ViewingHistoricalTA

Specifically look at the Order Action Source field.

There is no reason to provide us source code because we would never review that. Please be aware of support policy:
https://www.sierrachart.com/index.php?l=PostingInformation.php#GeneralInformation

Sometimes if a user has a particular problem that involves something that we need to solve on our side, then a small block of code may be provided to help us isolate the problem.
Sierra Chart Support - Engineering Level

Your definitive source for support. Other responses are from users. Try to keep your questions brief and to the point. Be aware of support policy:
https://www.sierrachart.com/index.php?l=PostingInformation.php#GeneralInformation

For the most reliable, advanced, and zero cost futures order routing, *change* to the Teton service:
Sierra Chart Teton Futures Order Routing
[2015-12-23 15:34:26]
User713273 - Posts: 409
Great, thx for that. I have a question involving using the spreadsheet system for trading. Im using the underlying sc.subgraph to reference buy/sell entry columns, the issue is that my system is buying both stock and options, I just want to buy options as my code dictates this. Any way to block the stock buy/sells from occurring while still buying the underlying option?
[2015-12-23 18:04:10]
User713273 - Posts: 409
Would a study function that can be programmed to prevent it from being used on a Symbol other than the one specified work, as we will be opening charts containing different symbols attributed to K & M columns.

//This is an example to prevent a study from being used on a Chartbook other than the one specified
if(sc.ChartbookName != "Chartbook50")
return;

//This is an example to prevent a study from being used on a symbol other than the one specified
if(sc.Symbol != "ABCD")
return;
[2015-12-24 20:08:57]
Sierra Chart Engineering - Posts: 104368
Therefore, do not use the Spreadsheet System for Trading study. And instead use the Spreadsheet System/Alert study:
http://www.sierrachart.com/index.php?page=doc/doc_SystemsAlerts.php

You can reference the results of that study but that study will not submit orders itself.
Sierra Chart Support - Engineering Level

Your definitive source for support. Other responses are from users. Try to keep your questions brief and to the point. Be aware of support policy:
https://www.sierrachart.com/index.php?l=PostingInformation.php#GeneralInformation

For the most reliable, advanced, and zero cost futures order routing, *change* to the Teton service:
Sierra Chart Teton Futures Order Routing
Date Time Of Last Edit: 2015-12-24 20:09:23
[2015-12-24 21:17:44]
Sierra Chart Engineering - Posts: 104368
Regarding post #7. What do you think? We do not provide programming help.
Sierra Chart Support - Engineering Level

Your definitive source for support. Other responses are from users. Try to keep your questions brief and to the point. Be aware of support policy:
https://www.sierrachart.com/index.php?l=PostingInformation.php#GeneralInformation

For the most reliable, advanced, and zero cost futures order routing, *change* to the Teton service:
Sierra Chart Teton Futures Order Routing
[2015-12-27 04:40:51]
User713273 - Posts: 409
Thx, the alert system works great. On another note, im having an issue referencing column M or sell entries utilizing the same methodology in referencing column K for buy entries. Been struggling with the code on this for awhile, I'm hoping this is a "small block of code" for you to reference and help us out.

Thanks-

//s_ChartStudySubgraphValues SpreadSheetColK;
//SpreadSheetColK.ChartNumber = ISpreadSheetChartNo.GetChartNumber();
//SpreadSheetColK.StudyID = ISpreadSheetChartNo.GetStudyID();
//SpreadSheetColK.SubgraphIndex = 10; //K
SCFloatArray SpreadSheetColKBuyArray;
sc.GetStudyArrayUsingID(ISpreadSheetChartNo.GetStudyID(), 0, SpreadSheetColKBuyArray); //K
//sc.GetStudyArrayFromChartUsingID(SpreadSheetColK, SpreadSheetColKBuyArray);

//s_ChartStudySubgraphValues SpreadSheetColM;
//SpreadSheetColM.ChartNumber = ISpreadSheetChartNo.GetChartNumber();
//SpreadSheetColM.StudyID = ISpreadSheetChartNo.GetStudyID();
//SpreadSheetColM.SubgraphIndex = 12; //M
SCFloatArray SpreadSheetColMSellArray;
sc.GetStudyArrayUsingID(ISpreadSheetChartNo.GetStudyID(), 1, SpreadSheetColMSellArray); //M
//sc.GetStudyArrayFromChartUsingID(SpreadSheetColM, SpreadSheetColMSellArray);

if ((IsTradeTime) &&
(sc.Index >= PermData->HistoricalArraySize) &&
(!sc.ChartIsDownloadingHistoricalData(sc.ChartNumber)))
{
int kIndex = SpreadSheetColKBuyArray.GetArraySize() - 1;
if ((SpreadSheetColKBuyArray[kIndex] != 0) ||
PermData->OrderSignal[CALL] )
{
if (!PermData->OrderSignal[CALL])
{
sprintf(msg, "Signal - Buy");
sc.AddMessageToLog(msg, false);
}

PermData->OrderSignal[CALL] = true;
PermData->NewEntryPrice = round(sc.BaseData[SC_LAST][sc.Index]);
OptionPos* optionPos = PermData->OptionPosList;
if (CheckOptionPosExits(sc, CALL, optionPos, PermData))
PermData->OrderSignal[CALL] = false;
else
{
if (!CreateNewOptionPos(sc, true, CALL, optionPos, PermData))
{
sprintf(msg, "Symbol Names %s Qty %d %s Qty %d", optionPos->OptionName, optionPos->Qty, optionPos->OptionName, optionPos->Qty);
sc.AddMessageToLog(msg, false);

// submit order for entry, including target and stop
DoOneEntry(sc, CALL, optionPos, SGEntryMarker, PermData);
PermData->NewEntryPrice = -1;
PermData->OrderSignal[CALL] = false;

}
}
}

kIndex = SpreadSheetColMSellArray.GetArraySize() - 1;
if ((SpreadSheetColMSellArray[kIndex] != 0) ||
PermData->OrderSignal[PUT])
{
if (!PermData->OrderSignal[PUT])
{
sprintf(msg, "Signal - Sell");
sc.AddMessageToLog(msg, false);
}
PermData->OrderSignal[PUT] = true;
PermData->NewEntryPrice = round(sc.BaseData[SC_LAST][sc.Index]);
OptionPos* optionPos = PermData->OptionPosList;
if (CheckOptionPosExits(sc, PUT, optionPos, PermData))
PermData->OrderSignal[PUT] = false;
else
{
if (!CreateNewOptionPos(sc, true, PUT, optionPos, PermData))
{
sprintf(msg, "Symbol Names %s Qty %d %s Qty %d", optionPos->OptionName, optionPos->Qty, optionPos->OptionName, optionPos->Qty);
sc.AddMessageToLog(msg, false);

// submit order for entry, including target and stop
DoOneEntry(sc, PUT, optionPos, SGEntryMarker, PermData);
PermData->NewEntryPrice = -1;
PermData->OrderSignal[PUT] = false;

Date Time Of Last Edit: 2015-12-27 04:58:34
[2015-12-27 08:18:06]
Sierra Chart Engineering - Posts: 104368
We do not provide programming help. This is a treacherous territory for us to attempt to help a user with and we must stay clear of it. It is your responsibility to debug your own code.

If you are 100% percent confident there is something that Sierra Chart is not doing correctly, then we need a simple example to demonstrate it. However, first refer to the documentation to make sure you are using the functions properly. And work with the provided examples that use the ACSIL functions, to verify that those functions do work properly. You will see that they do.
Sierra Chart Support - Engineering Level

Your definitive source for support. Other responses are from users. Try to keep your questions brief and to the point. Be aware of support policy:
https://www.sierrachart.com/index.php?l=PostingInformation.php#GeneralInformation

For the most reliable, advanced, and zero cost futures order routing, *change* to the Teton service:
Sierra Chart Teton Futures Order Routing
Date Time Of Last Edit: 2015-12-27 08:23:39

To post a message in this thread, you need to log in with your Sierra Chart account:

Login

Login Page - Create Account