Welcome to NexusFi: the best trading community on the planet, with over 150,000 members Sign Up Now for Free
Genuine reviews from real traders, not fake reviews from stealth vendors
Quality education from leading professional traders
We are a friendly, helpful, and positive community
We do not tolerate rude behavior, trolling, or vendors advertising in posts
We are here to help, just let us know what you need
You'll need to register in order to view the content of the threads and start contributing to our community. It's free for basic access, or support us by becoming an Elite Member -- see if you qualify for a discount below.
-- Big Mike, Site Administrator
(If you already have an account, login at the top of the page)
Hello everyone
This is my first post here and I hope this is the correct sub-forum to addess this. I have been studying various EL introductions but I did not get clarity on some statements.
I am trying to understand some EL-Code in order to translate this to my platform. Since I don’t have access to TS to test things out I am reaching out here.
The code is about as follows:
I am reading the above as follows:
if there is no position or current position is long then
enter a short position of one contract as soon as the next bar starts but only if the price is at least as low as p1.
So it will not execute an order in the current bar, right?
Is it also correct that the order remains active until price<=p1? Meaning even if the condition price<=p1 is only met 10 bars later?
Thank you
dubi
Can you help answer these questions from other members on NexusFi?
if there is no position or current position is long then
enter a short position ORDER of one contract as soon as the next bar starts - to sell short if the price of the next bar is at p1 or below. This order will be active for the entire next bar. If it does not fill during the next bar, it will not renew the order for the next bar unless the condition is evaluated as true again.
So, if this is your whole code, if the order is not filled that next bar, at the end of that bar the code will be reevaluated, and since marketposition is still >=0, the order would be resubmitted.
Also note that the order will be filled at market if price is below p1. You may want to think about this if you are dealing with daily bars. Maybe you need a stop-limit order.
Also note that the order will be filled at market if price is below p1. You may want to think about this if you are dealing with daily bars. Maybe you need a stop-limit order.
That is a good point, if there is a opening gap. The strategy backtest will show a fill at the open price in this case.
In actual trading, though, the order will be rejected at the broker, since you can't enter sell stop orders that are above the market.