Back

Difference between Filled and Partially Filled

The document says:

"The OrderTicket Status property can be used to determine if the order is filled. The OrderStatus enum has the values Submitted, PartiallyFilled, Filled, Cancelled or Invalid."

 

From what I understand, the PartiallyFilled status only happens when the order is not set to All or None. Now my questions:

1- where do we set detail attribues of a buy order such as AllOrNone or Till End Of Day or Good Until Cancelled, etc.?

2- If Partially Filled happens, will the order stop there? or continues to try to fill the whole order?

3- If it continues to fill it, can we cancel the rest of the order?

 

Thanks a lot!

Update Backtest








Hmmm 

this article is one of the most interesting ones. I am always intersted in what people are playing with. There is so much stuff out there. I am backtesting Volatility-Strategies mostly but trying to get a Trendfollowing-Strategy on minute bars profitable. It seems you too... :)

0

Michael,

A couple of years ago I put at least 50 different strategies into test but only using daily data. Eventually I came to this conclusion that technical trading is not reliable. You could increase profit by adjusint things but at the end news, events, and sentiments are much much more important than Stochastic, EMA, trend, etc.

That time I did not have access to high resolution data as it's really expensive. Now thanks to QC, I was finally able to test some of my best performer algorithms with Minute and Second and I must say TA works just fine when news, events, and sentiments can't impact them. Because an OPEC meeting or a FED meeting or an earning report can make the indicators goofy and out of the radar's screen but it will take many seconds/minutes before that happens and your algo has enough time to take a decision and get out of the market until it's back to normal.

By any chance have you tried your method with Second data?

 

0

thanks for the honest words Patrick. Still people are trading a lot with RSI for 20 years and get profits and build very impressive strategies with that. Moving averages also work for a bigger time window. If you go on youtube and search EMA 20 you get 21800 results. But yes if someone can define his own rules for investing his own money thats the best thing that can happen. The things you decribe are the reason why i'm working on a intraday strategy. Mostly trying to find a trend to follow. 

I tried to reduce to seconds resolution and build minute bars for trying to predict where the bar will be in few seconds to buy/sell. But that never worked because of gaps every full minute. I have never thought of taking a lot of money to buy at a specific price and sell 0,8% later like the big guys do at spikes when the stock is falling for example. With IB i always thought it will never work because you get 200ms Bars from them at tick resolution. And you are working here at QC with data from a different provider. So with a different broker people are always ahead of you when you use IB. That was always my view on my small trading planet. :)

I would test with 1 - 2 seconds fill time as it gets very realistic with IB. With less the others are ahead of you but maybe not. I dont know your strategy. So maybe try the TickConsolidator to create Second Bars and then try to tune it somehow. Ticks would be maybe faster than seconds. But my opinion is that QC fillforward will homehow interfere with real life environment, So forget the paper trading and do instead of real orders writing to a log file when and at which price your algo would buy and sell in live trading. That would be the first test. 3MB or more of log reading. 

but i dont have that much experience in trading. thanks for answering once again

0

Thanks Michael, these are good advices. And please don't take me wrong. I did not mean to say that TA doesn't work at all. By not being reliable what I meant was that news, etc. can change the results drastically. If an OPEC meeting happens when the US market is closed, the next morning your MA, Stoch, RSI etc. are going to give you completely wrong signals. As you said, in a long enough time, these noises will be rectified by clean signals but then let's not forget that the profit will be a lot less. Especially because as a wise trader said, a 50% loss takes a 100% profit to go back to zero! So loss is always more impactful than profit.

One more thing. A lot of times we tend to test strategies in a specific time span and adjust it to get a better result. However, when you take the same "optimized" strategy to a different environment, it can behave completely different. Personally I'm very cynical about strategies and try to apply the Murphy's laws wherever I can. So I test things in bullish, bearish, sideways, and mixed time periods to make sure the behavior is consistent. I also test them with extreme price jumps like when Netflix lost 40% in a couple of days or during the market crash in 2008-2009.

Anyway these are very good discussions. Please keep it coming :)

0

I am typically skeptical of TA because there's a lot of algos automatically trying to discover patterns already and whenever a new is found is will be quickly arbitraged out. Humans can make it work by constantly adapting and filtering raw TA signals, for algos you need ML for that or other forms of parameter tuning, and even then it's not easy.  One needs a lot of luck to find a TA strategy posted online that is still working. ;)

Simply avoiding scheduled press releases since our algos can't compete in latency versus HFT seems like a very good idea. Where do you get your data for that Patrick?

0

Because in one point I hit the wall and couldn't improve the indicators any more. Nothing could prevent the news (I have to also say that Elliott Waves are effective for tracking sentiments). Large trading entities have sophisticated systems to consistently follow the news and events and convert them into quantifiable measures and feed them to their automatic systems but obviously we don't have that. Therefore, the only remaining way is to make the trades short/fast enough to minimize the amount of noise (and increase the signal).

As you said, ML is much more effective than primitive indicators. From what I see in my test results, keeping the average trade time under a few minutes also can increase the performance a lot.

 

0

Update Backtest





0

The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by QuantConnect. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. QuantConnect makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances. All investments involve risk, including loss of principal. You should consult with an investment professional before making any investment decisions.


Loading...

This discussion is closed