- ago
I have a strategy that Stop Buys at 1% NextSessionOpen and Stop Sells a 1.2% below the (previous day's) Open. It didn't produce a signal today when I had it set to run at market open. I've loaded it twice in the Strategy Monitor so I can run it on FNGU and URNM. It should be producing a signal every day. I re-ran them both by right-clicking and selecting Run Now and they both produced signals.

Here is the FNGU log:
3/15/2024 08:25:38: Status = LoadingData
3/15/2024 08:25:38: Start Polling Thread
3/15/2024 08:25:38: Populating Data
3/15/2024 08:25:38: Calling GetHistories Pass 1
3/15/2024 08:25:38: GetHistories returned with 1 symbols
3/15/2024 08:25:38: Calling GetHistories Pass 2
3/15/2024 08:25:38: GetHistories returned with 1 symbols
3/15/2024 08:25:38: FNGU:100 bars to 20240314 0000|IQFeed
3/15/2024 08:25:38: NextRun set to 3/15/2024 08:30
3/15/2024 08:25:38: Status = Idle
3/15/2024 08:30:00: Status = Processing
3/15/2024 08:30:00: Pass 1 - Requesting updates for 1 symbols...
3/15/2024 08:30:00: Pass 1 - UpdateHistories returned 0 symbols
3/15/2024 08:30:02: Ran Strategy on FNGU: 0 Signals, Run Time=1.93sec
3/15/2024 08:30:02: NextRun set to 3/18/2024 08:30
3/15/2024 08:30:02: Status = Completed
3/15/2024 08:30:02: Processed all Symbols
3/15/2024 08:31:07: Running Now
3/15/2024 08:31:08: Status = Processing
3/15/2024 08:31:08: Pass 1 - Requesting updates for 1 symbols...
3/15/2024 08:31:08: Pass 1 - UpdateHistories returned 0 symbols
3/15/2024 08:31:09: Ran Strategy on FNGU: 1 Signals, Run Time=297ms
3/15/2024 08:31:09: NextRun set to 3/16/2024 08:30
3/15/2024 08:31:09: Status = Completed
3/15/2024 08:31:09: Processed all Symbols
3/15/2024 08:31:30: Status = Deactivated
3/15/2024 08:31:31: Leaving Polling Thread
3/15/2024 08:32:14: Status = LoadingData
3/15/2024 08:32:14: Start Polling Thread
3/15/2024 08:32:14: Populating Data
3/15/2024 08:32:14: Calling GetHistories Pass 1
3/15/2024 08:32:14: GetHistories returned with 1 symbols
3/15/2024 08:32:14: Calling GetHistories Pass 2
3/15/2024 08:32:14: GetHistories returned with 1 symbols
3/15/2024 08:32:14: FNGU:100 bars to 20240314 0000|IQFeed
3/15/2024 08:32:14: NextRun set to 3/16/2024 08:30
3/15/2024 08:32:14: Status = Idle
3/15/2024 08:32:37: Status = Deactivated
3/15/2024 08:32:38: Leaving Polling Thread
3/15/2024 08:32:46: Status = LoadingData
3/15/2024 08:32:46: Start Polling Thread
3/15/2024 08:32:46: Populating Data
3/15/2024 08:32:46: Calling GetHistories Pass 1
3/15/2024 08:32:46: GetHistories returned with 1 symbols
3/15/2024 08:32:46: Calling GetHistories Pass 2
3/15/2024 08:32:46: GetHistories returned with 1 symbols
3/15/2024 08:32:46: FNGU:100 bars to 20240314 0000|IQFeed
3/15/2024 08:32:46: NextRun set to 3/16/2024 08:30
3/15/2024 08:32:46: Status = Idle

Here is the URNM log:
3/15/2024 08:25:38: Status = LoadingData
3/15/2024 08:25:38: Start Polling Thread
3/15/2024 08:25:38: Populating Data
3/15/2024 08:25:38: Calling GetHistories Pass 1
3/15/2024 08:25:38: GetHistories returned with 1 symbols
3/15/2024 08:25:38: Calling GetHistories Pass 2
3/15/2024 08:25:38: GetHistories returned with 1 symbols
3/15/2024 08:25:38: URNM:100 bars to 20240314 0000|IQFeed
3/15/2024 08:25:38: NextRun set to 3/15/2024 08:30
3/15/2024 08:25:38: Status = Idle
3/15/2024 08:30:00: Status = Processing
3/15/2024 08:30:00: Pass 1 - Requesting updates for 1 symbols...
3/15/2024 08:30:00: Pass 1 - UpdateHistories returned 0 symbols
3/15/2024 08:30:02: Ran Strategy on URNM: 0 Signals, Run Time=2.04sec
3/15/2024 08:30:02: NextRun set to 3/18/2024 08:30
3/15/2024 08:30:02: Status = Completed
3/15/2024 08:30:02: Processed all Symbols
3/15/2024 08:31:12: Running Now
3/15/2024 08:31:12: Status = Processing
3/15/2024 08:31:12: Pass 1 - Requesting updates for 1 symbols...
3/15/2024 08:31:12: Pass 1 - UpdateHistories returned 0 symbols
3/15/2024 08:31:13: Ran Strategy on URNM: 1 Signals, Run Time=273ms
3/15/2024 08:31:13: NextRun set to 3/16/2024 08:30
3/15/2024 08:31:13: Status = Completed
3/15/2024 08:31:13: Processed all Symbols
3/15/2024 08:32:24: Status = Deactivated
3/15/2024 08:32:25: Leaving Polling Thread
3/15/2024 08:32:35: Status = LoadingData
3/15/2024 08:32:35: Start Polling Thread
3/15/2024 08:32:35: Populating Data
3/15/2024 08:32:35: Calling GetHistories Pass 1
3/15/2024 08:32:35: GetHistories returned with 1 symbols
3/15/2024 08:32:35: Calling GetHistories Pass 2
3/15/2024 08:32:35: GetHistories returned with 1 symbols
3/15/2024 08:32:35: URNM:100 bars to 20240314 0000|IQFeed
3/15/2024 08:32:35: NextRun set to 3/16/2024 08:30
3/15/2024 08:32:35: Status = Idle


I've had this happen before to URNM, but never to FNGU. Any idea what might be preventing them from producing signals when they are scheduled to run?
0
345
Solved
19 Replies

Reply

Bookmark

Sort
Cone8
 ( 25.44% )
- ago
#1
It looks like the data updated properly, so the only other obvious things that would kill signals would be:
1. a Position Sizer that returned 0 shares.
2. a Strategy modified to peek so that it doesn't process the last bar.

Which version of the 1% Strategy are you using?
If you've edited it, please post the code. The standard 1% Strategy (and v3) already traded out 3 days ago for profit. That's another reason there wouldn't be signals.
0
- ago
#2
It’s not the 1% per week. It’s a block strategy that is literally as simple as..

Stop Buy 1% above NextSessionOpen
Stop Sell at 1.2% below Open

PositionSizer is 20% of total equity. I’ve had issues where there wasn’t enough Buying Power in the past, but that didn’t prevent the signal from generating and the order from sending. When there wasn’t enough buying power, the order was rejected by the broker. This time, an order was never sent because there was no signal generated.
0
- ago
#3




0
Cone8
 ( 25.44% )
- ago
#4
Things to check:

1. You're using Broker Account value for sizing. Open the Accounts tool to make sure that the Account Value for your Tradier account is correct. To get a Signal for at least 1 share, it needs to be more than 300 / 0.20 = $1,500 for FNGU, but only 50/0.20 = $250 for URNM.

2. Next Session Open comes from the Historical Providers, so make sure that either Wealth-Data is checked and at the top. If IQFeed is above Wealth-Data and you're on a delayed IQFeed subscription, that would be a problem.
0
Best Answer
- ago
#5
1. This is not the problem. Plenty of money in the account. I confirmed by checking the Accounts Tool.

2. This might be the culprit. I'm not seeing that IQFeed ever charged me for Feb or March, so I'm digging into this further. However, I put all my symbols in the quote tool and have them set to stream in an effort to try to get that NextSessionOpen value as quickly as possible. So, I don't understand how it'd be able to stream if getting real-time data was the problem.

Thanks for the guidance.
0
Cone8
 ( 25.44% )
- ago
#6
It often happens that even if you're paying for live data, IQFeed keeps you on delayed until you specifically request that they change it to realtime.

You'll still stream on delayed, but if data are delayed, GetSessionOpen will be "NaN" until 09:45, so no Signal.
0
- ago
#7
I confirmed with IQFeed that I'm getting live data for Nasdaq and NYSE. I opened the quotes window during the first 15min of market open and confirmed that it is indeed live. Also, there is plenty of money in the account as confirmed by opening the Accounts window in WL.

This issue is continuing to happen. It missed two signals/orders this morning. It missed two signals/orders yesterday too. I manually re-ran the strategies yesterday 3-5min after the strategies failed to generate signals and they sent in appropriate orders just fine. Each of strategies I'm running right now simply places a Buy Stop at X% above NextSessionOpen, so they should be generating signals every day. Could you give this another look? I'm not always at my computer in the morning so am not always around to simply re-run the strategies that failed to generate signals/orders.

0
Glitch8
 ( 11.81% )
- ago
#8
It looks like the Strategy ran at 08:30:03. Is that 09:30:03 market time (EST?)

If so it's like not enough time for the provider to return the session open for that day.

The NextSessionOpen make a historical provider request to obtain the day's open, it has no way of accessing any running streaming quotes.

0
Glitch8
 ( 11.81% )
- ago
#9
I think I’ll add some retry/timeout logic to the NextSessionOpen indicator which might help these cases. We’ll get it done for Build 89.
0
Cone8
 ( 25.44% )
- ago
#10
Glitch, before doing the historical request, how about first checking for the opening price in any Streaming Quotes window for NextSessionOpen and sessionOpenPrice for ExecuteSessionOpen()?

.. actually it doesn't look like we're requesting or saving the Open there, but it would be a good place to save the value and make available for quick lookup from other clients.
0
Glitch8
 ( 11.81% )
- ago
#11
The indicators don’t have access to any UI specific info like a quotes window.
0
- ago
#12
08:30:03 is Central Time (09:30:03 market time)

If the data provider is not returning the opening price that quickly, then that’s really frustrating..especially from IQFeed. I have IQFeed on top, then Wealthdata. It would be nice if it could try both simultaneously and, if the top provider doesn’t return a value, then it would use Wealthdata.

My only concern with the timeout/retry logic is if you delay the retry by too much time, the price might exceed my Stop Buy/Sell buy too much and simply convert those to market orders well beyond where the Stop Buy/Sell was set at. Is there any way we could control the amount of time to delay before the retry and # of retries before it stops retrying? It’d be nice to configure those options in SM when we configure our strategy after adding them.
0
Glitch8
 ( 11.81% )
- ago
#13
The plan is to retry every 2 seconds with a 15 second timeout. Let’s see how that goes. And, our internal processing already does cycle through the providers as you described.
0
- ago
#14
Every 2 seconds with a 15 second timeout seems very reasonable to me.

That’s bizarre. If it cycled through the providers like I described, why wouldn’t it have taken the NextSessionOpen from WealthData? Seems like it’d be a very rare instance where both fail to provide the data at market open, let alone both not providing the data for multiple symbols in the same day.

Despite that, thanks for the workaround to retry/timeout. Sounds like it’ll work well.
0
Glitch8
 ( 11.81% )
- ago
#15
There are thousands of stocks and I’m sure it takes some time to assign the open price for each one for purposes of historical requests.
0
Cone8
 ( 25.44% )
- ago
#16
The Open is available from Wealth-Data immediately, but only if the symbol has actually had an opening trade. Nearly all Nasdaq stocks open precisely at 09:30:00, but that isn't the case for NYSE, which can open individual stocks minutes later.

Another [good] possibility is that you computer's clock is fast and your strategy ran before the stock actually had an opening tick.

0. Put Wealth-Data (checked) at the top of Historical Providers
1. Sync your clock to internet time
2. Schedule the run for 09:30:01

0
- ago
#17
QUOTE:
The plan is to retry every 2 seconds with a 15 second timeout. Let’s see how that goes. And, our internal processing already does cycle through the providers as you described.


It’d also be nice if the retry/timeout logic could detect when orders were Rejected or Cancelled by the broker, so it could retry. For whatever reason, I’ve had cancelled or rejected orders from Tradier and I just manually click “Run Now” and they are submitted successfully.
0
Cone8
 ( 25.44% )
- ago
#18
You're talking about something that happens (a rejected/cancelled order) "long after" the other one has finished its job (acquiring the order price to create the signal).

But yes, it would be very nice to have a crystal ball that did that!
0
Glitch8
 ( 11.81% )
- ago
#19
Asking an indicator to do something based on the status of a placed order with the broker is out of scope for indicators.
0

Reply

Bookmark

Sort