Everything that follows pertains to use of daily bars.
Not sure this is possible, but need to ask.
Is there a way(in Simulations) to make market entry/exit reflect the average of open & close on entry/exit day?
This is best way I can imagine to reflect effects of using a VWAP order in Simulations.
I have a script that relies on getting in/out in a single day(size of orders requires VWAP orders thru trade desk). MOO & MOC will both likely create slippage in real life... vs what Simulator indicates using MOO/MOC orders.
So is it possible, to code script so that it "peeks" into the future(next day/entry day) and creates entry/exit point that is average of Open && Close?
I realize this will not reflect true VWAP, but it will be close enough... and far better than MOO/MOC.
Thanks in advance,
Size:
Color:
With Bloomberg and BBLaoder you have the option to load bloomberg´s daily VWAP and can use that as an entry with FundamentalSeries. I did not do this before but I think this should work.
Size:
Color:
Can you offer a snippet of code that would make this work?
Sounds like a great idea, but not sure how to implement effectively.
Assume it will also work on exits??
Here's the big ?, if instruct script to MOO or MOC, how will it know to "Market on VWAP".
Or does Bloomberg substitute OHLC w VWAP only???
Meanwhile, I'll experiment.... perhaps easier done than I imagined.
All the best to you & yours,
T!
Size:
Color:
QUOTE:
Is there a way(in Simulations) to make market entry/exit reflect the average of open & close on entry/exit day?
You can use the
ExitAtPrice method in the Community.Components.
Size:
Color:
Thank you both!
Robert,
Will try your ExitAtPrice method 1st. It is exactly the solution I was seeking.
Will update this thread once I see results.
TTFN
Size:
Color:
Cone et all,
Need your help installing Priority code to the EXITATPRICE example you provided above.
I tried installing the VWAP-style entry/exit into my private script. It worked perfectly, except it does not allow me to use LastPosition.Priority coding. I use a focused portfolio of just 10 stocks (via Pos-Sizer) and this VWAP-style code comes back with errors when I include "LastPosition.Priority coding". See example below.
Can you help me correct the syntax problem?
Perhaps my error is changing Entry to Bar+1.
But in live trading, I have to use today's Technicals/Fundamentals to make a decision for entering tomorrow, hence my desire to get a VWAP-style entry price vs MOO/MOC.
CODE:
Please log in to see this code.
The actual Private script I use is far more detailed. May need to open order ticket later. In the meantime, just trying to get Priority code to cooperate with VWAP-style entry price.
Size:
Color:
Correction:
CODE:
Please log in to see this code.
Size:
Color:
Embarassing that I missed a syntax error like this.
Thank you.
Your solution(&Cone's) is perfect!!!
Have a great weekend.
Size:
Color:
Does entry and exit at price stil work?
Trying to do what the people above have done. Enter at bar+1 on next day's vwap and exit on bar+1's vwap.
Help would be appreciated.
Thanks again.
Size:
Color: