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)
you should study how the reserved words for SetProfitTarget and SetStopLoss work and should be used. Take a look at the build in Profit Target and Stop Loss signals.
They are still placed inside your conditions and this will most likely result in your entries being without stops and targets at some point.
Platform: NinjaTrader, TadeStation, ThinkOrSwim, and StreetSmartEdge
Trading: CL
Posts: 9 since Aug 2015
Thanks Given: 11
Thanks Received: 1
Thank you ABCTG! I've made considerable progress in the coding of my order execution strategy. However, I've noticed that not every new bar is getting me in the trade. Also, it appears that every trade I'm getting in is getting me in at the opening of the new bar- NOT the high/low of the previous bar, as ordered. Any input would be greatly appreciated.
you might want to add print statements to check your conditions on the bars that don't get you in a trade. So you can check what happens there. If you are already inside a position, this might just be caused by your pyramiding settings that block new trades.
Using your code I don't see any situation on a chart where the trade entry is not at the high or low of the previous bar (or higher/lower due to the stop order). What chart symbol and time frame did you use. Can you post an example of a specific situation?
On a side note, with intrabar order generation you should use the look inside bar backtesting feature if you don't already.
Platform: NinjaTrader, TadeStation, ThinkOrSwim, and StreetSmartEdge
Trading: CL
Posts: 9 since Aug 2015
Thanks Given: 11
Thanks Received: 1
Thank you ABCTG. I have placed plenty of print statements inside conditions on the bars and am getting a very deep understanding of how orders are executed with EasyLanguage. I'm using AMZN-15M chart as a sample.
A problem I'm in the middle of, at the moment, is when MarketPosition becomes a 1, I push SetprofitTarget and SetStopLoss orders. When it is filled one way or another, what do I look for in order to know it has been filled?
Also, would you kindly provide a link for me to read about Intrabar "look inside bar" backtesting feature please?
I would have to look it up in the Tradestation wiki, forum or helpfile, too. You should be able to find it in all three.
You can also use Google to find something.
Regards,
ABCTG
DrRon
Also, would you kindly provide a link for me to read about Intrabar "look inside bar" backtesting feature please?
when your MarketPosition changes from 1 to 0 an exit took place. You can then check if the trade exited with a profit or loss and thus know if your target or stop was hit.
If you need more information you can obtain order names etc. via Object Oriented Easylanguage, but I would advise to only start using that once you have a solid EasyLanguage foundation to build onto.
Regards,
ABCTG
DrRon
A problem I'm in the middle of, at the moment, is when MarketPosition becomes a 1, I push SetprofitTarget and SetStopLoss orders. When it is filled one way or another, what do I look for in order to know it has been filled?
Platform: NinjaTrader, TadeStation, ThinkOrSwim, and StreetSmartEdge
Trading: CL
Posts: 9 since Aug 2015
Thanks Given: 11
Thanks Received: 1
[UPDATE] I created a flag that would indicate where we are in the process and after exhaustive troubleshooting I discovered that when I'm declaring this flag under variables, I must declare it as IntraBarPersist when IOG is true!
this goes for all your variables that you want to update intrabar, otherwise they might not hold the correct values.
Regards,
ABCTG
DrRon
[UPDATE] I created a flag that would indicate where we are in the process and after exhaustive troubleshooting I discovered that when I'm declaring this flag under variables, I must declare it as IntraBarPersist when IOG is true!
Platform: NinjaTrader, TadeStation, ThinkOrSwim, and StreetSmartEdge
Trading: CL
Posts: 9 since Aug 2015
Thanks Given: 11
Thanks Received: 1
Thanks ABCTG! I wish someone had told me about this. After putting Print at every turn, I noticed that my flag was changing values (like it had a mind of its own). I dug deeper into declaring variables and discovered IntraBarPersist!