Support Board
Date/Time: Tue, 10 Jun 2025 21:45:30 +0000
[Programming Help] - POSITION QUANTITY - Spreadsheet for Trading - J8 position quantity error
View Count: 1258
[2022-04-06 04:06:33] |
rkarrow - Posts: 9 |
Simple program using Spreadsheet for Trading. In simulated trading, the program works perfectly. Position quantity (J8) functions perfectly. When I switch to live trading, position quantity resets immediately to zero. This is normal and OK. After a trade takes place, J8 on spreadsheet reads the correct quantity. BUT it will suddenly reset to zero???? For this program, I am using Interactive Brokers for my data and trade feed, with "allow support for Sierra Chart Feeds" set to NO Works fine in SIM, dies a horrible death in live trading. My program depends on J8 to tell it what it needs to do next. I have tried "trade management by study" and the spreadsheet started with a position of 28. Where that came from is questionable but it's incorrect and of no use. Date Time Of Last Edit: 2022-04-06 06:29:15
|
[2022-04-06 14:33:06] |
Sawtooth - Posts: 4224 |
Check the Trade Service Log to see why J8 went to zero.
|
[2022-04-07 00:09:14] |
rkarrow - Posts: 9 |
NEW PROBLEM AS I SOLVED THE J8 PROBLEM (I THINK???). NEW QUESTION WITH NEW PROBLEM Simple program using Spreadsheet system for Trading. In simulated trading, the program works perfectly. I'm using the study "Trading Position Quantity". I had previously used J8 in the spreadsheet for position quantity but it had an error in the program that reset itself to zero when there would be an active position (forget about this error). Position quantity is necessary for the proper functioning of the program. In SIM the position quantity is always correct. In SIM trading the program functions perfectly, always showing the correct position quantity. Overall it works great in SIM. BUT . . . When I switch to live trading, position quantity shows 27, which screws things up in the program. HOW DID THE 27 OCCUR . . . Previously, the program was trading incorrectly (a different error since fixed). The error was that SC live trading would be in in a buy mode and it would execute a buy on every new bar. It would accumulate more buy contracts beyond the contract limit set in the spreadsheet. On these occasions, I would manually stop the SC program. I believe this accumulated 27 buys (historical buys) in the Sierra program because I stopped the program. Often there would be a position of 5 or more contracts when exiting the program. I would manually sell the the erroneous trades on Interactive Brokers and the IB position quantity would be set to zero. For this program, I am using Interactive Brokers for my data and trade feed, with "allow support for Sierra Chart Feeds" set to NO. On the study "Spreadsheet system for trading" I had set a limit of 2 contracts. The SC program obviously ignored this limit. What I propose is to edit a file (????) that now says I have a position of 27 contracts to zero contracts. Where is the file. Every log file I find is in data not ASCII. HOW DO I DO THIS??? Or is there a better solution??? EDIT Trade position window showed a different symbol than the chart I was using. It had MES-202206-GLOBEX-USD and I had MES-202206-GLOBEX. I have since changed the SC chart window symbol to match. Isn't IB FUN???? IB is not using Teton yet, right???? Date Time Of Last Edit: 2022-04-07 00:24:35
|
[2022-04-07 01:21:10] |
Sawtooth - Posts: 4224 |
What I propose is to edit a file (????) that now says I have a position of 27 contracts to zero contracts. HOW DO I DO THIS???
To delete a Fill in the Trade Activity Log, go to Trade >> Trade Activity Log ...... then select Fills, Symbol, and Account... then highlight the fill(s) you want to delete... then go to Edit >> Delete Trade Activity Entry IB isn't fun. Just look at the convoluted setup instructions, symbol coding, trading related issues, and other problems. Interactive Brokers Trading Service If you are only trading futures for yourself, and you don't trade stocks, you should consider changing brokers. I suspect the issues you are having are related to IB, not Sierra. When real money is at play, you need a setup that is stable and solid. You should at least consider using Denali data with IB. It is doubtful IB will ever authorize Teton order routing. They have their own connectivity to the exchanges. |
[2022-04-07 01:58:53] |
rkarrow - Posts: 9 |
THANK YOU . . . THANK YOU . . . THANK YOU . . . THANK YOU . . . So easy when you know how to fix the problem. I already have Denali, but for purposes of this program, I only wanted IB data trade setup. I wanted to keep that aspect simple. I have looked closely at Teton during the problems I was having. I don't know which broker or clearing house to select. I would have to look into their finances and see who is riding high with lotsa dough. That might not be easy. I lived thru the 1987 crash (sitting on the sideline starting Oct 4 or 6??) and that's why I worry about broker/clearing house surviving another occurrence. The FED saved lotsa brokers back in 1987. I've been around the block many times as I started when I was 14 and I'm now 81. You should read about my early trading life at the following link. It's called "Death Of a Gunslinger – 1955 to 1987". You'll find I did some crazy stuff along the way. https://stock-market-observations.com/2019/06/08/2019-bobs-early-trading-days/ Clearing house instead of a broker. Have no knowledge of going this route. THANK YOU AGAIN, Bob |
[2022-04-07 02:22:40] |
Sawtooth - Posts: 4224 |
I would have to look into their finances and see who is riding high with lotsa dough.
Go here to get the financial data for all FCMs:https://www.cftc.gov/MarketReports/financialfcmdata/index.htm Click on the latest date's PDF. Here's a list of FCMs and Introducing Brokers that support Teton: Sierra Chart Teton Futures Order Routing: Setup Instructions |
[2022-04-07 05:15:27] |
rkarrow - Posts: 9 |
Thank you for the info. You've been very helpful. Thanks again, Bob |
[2022-11-11 17:52:25] |
User87521 - Posts: 116 |
I am having problems with this as well. These problems are recent. Just occurred in the last week or so. I have been running a spreadsheet system for trading chartbook for a few years. No problems. Now, it's not recognizing the current position. Position quantity keeps changing to 0. Prior to the problems occurring I used simple buy/sell rules with a limit on position size. First, Sierra stopped recognizing the position size limit. So, I added a parameter that used J5/J8 to determine if there was a position. This helped a bit but now it seems to be changing to 0 all the time. Not sure where to go from here. Another thing that is happening is a new order is generated (if the chartbook requires a position) when my data feed logs off. IB logs off every night, so this is problematic. FYI I am using IB with Sierra and "allow support for Sierra Chart Feeds" set to YES. I am trading QQQ options. Not futures. Thanks for any help. Been a Sierra user for probably around 20 years now. |
To post a message in this thread, you need to log in with your Sierra Chart account: