- ago
I am automating trading for a strategy that generates daily signals using daily data. Is there a way to auto-place a live trade on the same day I get the signal (based on yesterday's close data) without using intraday data compressed to daily for daily signals?
0
410
13 Replies

Reply

Bookmark

Sort
Cone8
 ( 3.70% )
- ago
#2
My guess is that you're asking about same-bar exits?
0
Glitch8
 ( 8.31% )
- ago
#3
Yes use the same bar exit functionality. It’s available via check boxes in the exit Building Blocks.
0
- ago
#4
QUOTE:
My guess is that you're asking about same-bar exits?

Not an exit but an entry.

QUOTE:
Yes use the same bar exit functionality. It’s available via check boxes in the exit Building Blocks.

Not exit, entry. I have a complex C# coded strategy I want to do this with. Also possible?
0
- ago
#5
This is an oldie from @Glitch
QUOTE:
We currently don’t have a hook to process a bar while it is being formed. We’d have to figure out how that could work, maybe a hook into the streaming update?

This is from this discussion
Not sure if there is an update to this.

In my strategy, the bar is already formed. I'm getting a signal today based on yesterday's closing data. I essentially want the signal to trigger a trade (or process Backtester.Orders) without waiting for the beginning of the next bar (tomorrow). Only concerned with live trading. Would want to exit on signal on same bar as well.
0
Cone8
 ( 3.70% )
- ago
#6
Wow, you've really thrown us a good curve, so there are only more questions...

Since it's another entry, what does it have to do with "same day as Signal"?
What's the first Signal?
What would trigger the second signal? When would it occur exactly? How it is related to the first Signal?
Is it in the same Strategy, and if so, why?

Instead of answering those questions, how about just giving us a clear chronological example of what you're trying to do.
0
- ago
#7
It's very standard. Sorry it sounds complicated.

Example: A two-moving-average crossing becomes a Buy on Wednesday at 4 PM (close of daily bar).

On Thursday morning (before or after market open), the strategy runs in the SM, and generates a signal to Buy.

If I don't do anything unusual, the Buy trade will be placed when the strategy runs again on Friday.

I'm looking for a way that the Buy trade will be sent to broker on Thursday while market is still open, not Friday.

Additional background on use case: I have multiple strategies that use daily data to generate signals. Currently, I am manually trading based on those signals as I receive them (signals received today are based on yesterday's close data).

Now I am automating all my trading and am attempting to emulate what I am currently in a semi-automated fashion, which is to manually place a trade the same day I get the signal, not on the next day, and still use daily data for signal generation. Essentially, I'm asking if there is a way to accomplish this without running base intraday data and compressing to daily for signal generation.

I hope this is clearer.
0
Glitch8
 ( 8.31% )
- ago
#8
I'm not sure why this post was deleted,

>>t's very standard. Sorry it sounds complicated.
Example: A two-moving-average crossing becomes a Buy on Wednesday at 4 PM (close of daily bar).
On Thursday morning (before or after market open), the strategy runs in the SM, and generates a signal to Buy.
If I don't do anything unusual, the Buy trade will be placed when the strategy runs again on Friday.
I'm looking for a way that the Buy trade will be sent to broker on Thursday while market is still open, not Friday.<<

But the solution is to run the Strategy Wednesday after the market close. The signal will then be placed for market open of Thursday.

But this assumption isn't correct:

"If I don't do anything unusual, the Buy trade will be placed when the strategy runs again on Friday."

If you run the Strategy on Thursday BEFORE the market opens it will generate the signal based on Wednesday's close and you can then place the signal for the trading day Thursday.
0
- ago
#9
QUOTE:
I'm not sure why this post was deleted,

Topic starter has completely changed the post. At first it was purely a technical message to me, the issue was resolved.
0
- ago
#10
Sorry it sounds complicated. I think I understand why.

I have multiple strategies that generate signals based on daily data, running in the SM. When trading stocks or ETF's I run the strategy before market-open, and I PlaceTrade(...OrderType.Market...) to place the trade on market open (same day I get signal).

When trading Options I am currently running the strategy after market-open and manually placing trades after I get the signal (same day). I am in the process of automating the trading but want it to happen the same day I get the signal, not the next day (bar).

The reason I am running the strategy post market-open for options (as opposed to pre-market with market order) are:
1. Options can have wide spreads and limited liquidity at the open and during early day trading. Yesterday's prices may not be relevant for today's trade.
2. I use (near) real-time Greeks and current pricing in constructing the Buy order. The current day's Greeks are not available until market opens.

I suppose I could delay running my strategy each day until 15 minutes before market close and issue a PlaceTrade(...OrderType.MarketClose...) to get data close to the actual trade. I would prefer to run it about an hour after open, which I am doing now.

My question is whether there is a way I could execute the trade soon after I get the signal (during market open), without having to use intraday data as my Data Scale, then compressing it for daily signals. If I use streaming data with a daily Scale would that work?

QUOTE:
If you run the Strategy on Thursday BEFORE the market opens it will generate the signal based on Wednesday's close and you can then place the signal for the trading day Thursday.

Yes, @Glitch. Of course. That is what I realized I was already doing with the "One Percent" strategy. There is a difference here, though, that I realized I needed to clarify. Fortunately, I did that (above) before I read your post.

0
- ago
#11
QUOTE:
Topic starter has completely changed the post. At first it was purely a technical message to me, the issue was resolved.

Yes @Eugene. My bad. I saw my request was no longer relevant and decided to write over it. You were so quick to respond to request and I stepped on that, thinking I wouldn't bother you with it. Sorry :(
0
Cone8
 ( 3.70% )
- ago
#12
QUOTE:
If I use streaming data with a daily Scale would that work?
No. Streaming is just a source to build bars.

QUOTE:
My question is whether there is a way I could execute the trade soon after I get the signal (during market open)
After what signal?

I still don't follow it. Just schedule the Strategy Monitor to run using Daily data during market hours when you want to place the option trade. There's nothing else to it.
0
- ago
#13
QUOTE:
I still don't follow it.

Of course not. You're thinking clearly and I'm wrapped around the axle switching from daily data to intraday data and backtesting switching to live trading. What I forgot is that there is always a backtest associated with live trading. The signal I see today when running the strategy was actually "created" yesterday (on Close bar), and will trade live at the Open of the first bar today, which if I run the strategy during market hours will be immediately.
0

Reply

Bookmark

Sort