StockFetcher Forums · Filter Exchange · Intraday Mean reversion of Strong stock.<< 1 2 3 >>Post Follow-up
saico
59 posts
msg #105082
Ignore saico
modified
2/21/2012 8:42:43 AM

Hi,

under Presets you can set your TWS to execute trades only during regular trading hours. Then you can submit your basket anytime after the close with the orders for the next day. They will rest at IB for the next trading session and you dont have to watch them anymore till around 1 hour prior to the next days close since you want to close the open trades. Once the limit of one of your orders is triggered it gets executed and at the same time the rest of the orders that are in the same OCA group will get cancelled by the system. Please also make sure to advice your TWS in the orders presets column to cancel orders within in the same OCA group instead of just reducing size.

The question now is how to manage the open positions. You can to this by just using moc sell orders manually like I mentioned above, or you'd use an API to manage the open orders.

Unfortunately its not possible with SF to backtest strategies with intraday profit targets, which leaves us only with end of day closing strategies.

At the moment I use a strategy that is just buying Naz100 stocks at S2 and sells at the close. Worked great in backtesting and works great in live trading. I have a basket with 5 OCA groups that guarantees me never have more than 5 open positions. I think its important to choose a number here, not much higher than that. The reason is, if I would set my max amount of open orders lets say to 10, the average daily number of fills would be around 3-5, but in down days 10 with a higher negative amount P/L wise. This will put your overall P/L to a much lower performance. So less is really more in that case here.

Saico

Billirider321
62 posts
msg #105083
Ignore Billirider321
2/21/2012 9:50:01 AM

saico,
Perfect and detailed answer.

Why do you buy at S2 support, Do you consider buying only strong stock, if yes how do you define strong stock. Did you read engineering returns article he defines it by TSI number.
For daily strategy I am going to research buying with RSI(2) < 25 and buying below 1 atr from open. Exit will be rsi(2) > 70. This will be overnight hold strategy.

saico
59 posts
msg #105092
Ignore saico
modified
2/21/2012 1:43:45 PM

I'm not looking for strong stocks within my list, just trying to keep things simple.

I like the ATR idea alot.

Kevin_in_GA
4,599 posts
msg #105097
Ignore Kevin_in_GA
2/21/2012 4:29:58 PM

Possible idea for buying at S2 support. based solely on previous stats for the low crossing below S2 1 day ago but closing above it by EOD.

Fetcher[
set{trigger1, count(low below s2 1 day ago,1)}
set{trigger2, count(close above s2 1 day ago,1)}
set{trigger, trigger1 * trigger2}
set{trigger100, count(trigger1 above 0.5,100)}

set{stats100, count(trigger above 0.5, 100)}
set{pctfilled, stats100 / trigger100}

add column trigger100
add column stats100
add column pctfilled
sort on column 7 descending

pctfilled above 0.75
close above 5
average volume(30) above 250000
]



The idea here is to put a limit order to buy if the price goes $0.01 below yesterday's S2, and close the order out at the end of the day.

Have not backtested this yet. Just kicking arond the idea.

Kevin

mahkoh
1,065 posts
msg #105098
Ignore mahkoh
modified
2/21/2012 5:20:50 PM

Fetcher[

set{trigger1, count(low 1 day ago below s2 1 day ago,1)}
set{trigger2, count(close 1 day ago above s2 1 day ago,1)}
set{trigger3, count(open 1 day ago above s2 1 day ago,1)}
set{trigger,trigger4*trigger3}
set{trigger4, trigger1 * trigger2}
set{trigger100, count(trigger1 above 0.5,100)}

set{stats100, count(trigger above 0.5, 100)}
set{pctfilled, stats100 / trigger100}

add column trigger100
add column stats100
add column pctfilled
sort on column 7 descending

pctfilled above 0.75
close above 5
average volume(30) above 250000

set{watch,s2*1.01}
close below watch
]



Run the filter intraday. If it hits price 20 minutes ago was no more than 1 % above today's S2.
Statistics give you over 75 % chance of closing out a winner near the close.

Hm, running into subscription restrictions..



mahkoh
1,065 posts
msg #105099
Ignore mahkoh
modified
2/21/2012 5:44:50 PM

OK, got it now. You need to code today's S2 as "S2 1 day ago"

Fetcher[

set{trigger1, count(low below s2 1 day ago,1)}
set{trigger2, count(close above s2 1 day ago,1)}
set{trigger, trigger1 * trigger2}
set{trigger100, count(trigger1 above 0.5,100)}

set{stats100, count(trigger above 0.5, 100)}
set{pctfilled, stats100 / trigger100}

add column trigger100
add column stats100
add column pctfilled
sort on column 7 descending

pctfilled above 0.75
close above 5
average volume(30) above 250000

set{watch,s2 1 day ago*1.01}
close below watch
]



Kevin_in_GA
4,599 posts
msg #105100
Ignore Kevin_in_GA
2/21/2012 6:40:43 PM

Mahkoh:

Simple explanation - you need to use YESTERDAY's pivot points for today's close. Each day they are calculated and it is impossible to be below S2 on the day it is being calculated.

Using yesterday's (known) values lets you set up a limit order which can be triggered (your way, it can never be triggered).

I made the same error when I first looked at pivot points until I realized what was going on.

saico
59 posts
msg #105104
Ignore saico
2/22/2012 9:00:36 AM

Kevin,

what I would find interesting is to have a statistical filter, that looks for those stocks, lets say for the recent 100 days, that hit the S2 and finished the day above it? So the filter should show those stocks with the highest percentage positive expectancy for buying at S2 and selling at the close of the same day. Unfortunately I struggle here at that point. Maybe you have an idea.

Saico

Kevin_in_GA
4,599 posts
msg #105105
Ignore Kevin_in_GA
2/22/2012 9:21:07 AM

Saico:

Look at what I posted ... that is EXACTLY what the filter does.

mahkoh
1,065 posts
msg #105122
Ignore mahkoh
modified
2/23/2012 7:04:10 PM

Fetcher[


set{trigger1, count(low 1 day ago below s2 2 days ago,1)}
set{trigger2, count(close 1 day ago above s2 2 days ago,1)}
set{trigger, trigger1 * trigger2}
set{trigger100, count(trigger1 above 0.5,100)}

set{stats100, count(trigger above 0.5, 100)}
set{pctfilled, stats100 / trigger100}

add column trigger100
add column stats100
add column pctfilled
sort on column 7 descending

pctfilled above 0.7
close above 5
average volume(30) above 250000

low below s2 1 day ago
set{profit,close - s2 1 day ago}
set{profitpercent1,profit/s2 1 day ago}
set{profitpercent,profitpercent1*100}
add column profit
add column profitpercent
]



This gives you a chance to check results using the day look back funtion.
I lowered pctfilled a bit to over 0.70 which results in more trades per day (about 10 on average)
This should spread the risk some more.

Looking at the results I would say that this can be traded profitably, but not by setting buy limit orders at S2 on all candidates.






StockFetcher Forums · Filter Exchange · Intraday Mean reversion of Strong stock.<< 1 2 3 >>Post Follow-up

*** Disclaimer *** StockFetcher.com does not endorse or suggest any of the securities which are returned in any of the searches or filters. They are provided purely for informational and research purposes. StockFetcher.com does not recommend particular securities. StockFetcher.com, Vestyl Software, L.L.C. and involved content providers shall not be liable for any errors or delays in the content, or for any actions taken based on the content.


Copyright 2022 - Vestyl Software L.L.C.Terms of Service | License | Questions or comments? Contact Us
EOD Data sources: DDFPlus & CSI Data Quotes delayed during active market hours. Delay times are at least 15 mins for NASDAQ, 20 mins for NYSE and Amex. Delayed intraday data provided by DDFPlus


This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.