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)
In tradestation is there any possible way to enable strategies on data2, data3, data4, etc, or is data1 the only possible chart where strategies can be applied? I have not found this documented anywhere.
Can you help answer these questions from other members on NexusFi?
with legacy EasyLanguage strategies you can only trade on Data1 and a strategy is always applied to the main data series of the chart. You can however utilize additional data streams within your strategy code.
As far as I know, you can only place orders on the ticker that is associated with data1. If you want to trade the data2 ticker, you need to create a new chart with that ticker as data1.
Sorry to hijack this thread, but I don't want to start another thread similar to this topic...
So, I heard you say that orders are placed on DATA1, OK, cool. Now let me ask...
If my Data1 is a Flex-Renko chart, can I have a HIDDEN Data2 in the chart that's a 5 minute chart that I can perform end of day tests with within the strat???
Also, I'm assuming that this is applicable to MultiCharts' powerlanguage as well, right?
Yes you can add data2 as a 5 minute bar. Your strategy however will only trigger on the end of a bar using data1. The only way to do this is using intrabar order generation and therefore you don't need data2.
I developed a few renko strategies a while back and never found a perfect solution for this. My best idea was to close when the time was greater than about 5-15 minutes before the session close. The last 15 minutes of ES or NQ session doesn't walk much but the hope is you get one bar to close in that period. I would also suggest not taking trades after a certain period before this time.
My suggestion would be don't take a new trade with 45 minutes to go and close any open trade after 15 minutes to go in the session. If you don't get any new bars then set exit on first bar of open.
Last piece of advice is don't use any form of renko in automated trading. It's a trap.
thanks for the reply Fox... let me ask you two questions regarding your post:
1) Your strategy however will only trigger on the end of a bar using data1 You're saying that you can not test for Barstatus = 2 on Data2??? and if not, then why not have Data1 be the 5 minute bar, Data2 be the Flex Renko chart, have all the strat tests done on Data2 as I currently test everything on the Renko chart and then use Data1 for the end of day test to close??? Wouldn't that work if what you say is true?
2) Last piece of advice is don't use any form of renko in automated trading. It's a trap. Why do you say that? So far, my trading has matched the backtesting on my renko bars because I've backtested with the entries ending with "this bar on close" and then next bar market for live. It works great, so I ask, why do you think that way? how is it a trap?
In regards to #1. No, the strategy will only trigger on the close of a bar on data1. So if you want to take trades based on your renko chart bar close, running renko on data2 will not work. To my knowledge, there is no good way to do what you need to do. I would suggest picking a certain amount of time before the close that you would like to try and close. If a bar closes greater than that time you will get closed. Otherwise, setting exit on close will give you a fill at the first new bar of the next session.
In regards to #2. Please read my response here and a few messages up you will find another. Mainly limited data set available and repainting was the biggest disappointment with renko. They are posts #110 and #102
Yes I shared my code for accurate backtesting on renko+ bars. I ran a strategy live for a few months on NQ that matched backtests very well. I too found the limited data a concern. 6 months was not sufficient for my comfort. Also, if you scroll up a few …
OH yes, I understand what you are saying about moving the FR to Data2. What about simply having a second strat that works on an IOG basis to close out at the end of day. The problem I'm having with IOG with my renko chart is that for some strange reason, switching over to IOG causes some of my commands to stop working. And no one can tell me why?
I would suggest the below. Again this is not perfect but it will get a large portion of your closes to automate. Set exit on close will be the failsafe of closing on the first opening bar. I just hacked this together so please test it if you are interested. I would also suggest doing something similar to limit new trades to a certain time before you profittime so you don't open a trade then close it immediately due to these conditions.
This is the first I've heard or seen the reserve word "SetExitOnClose". I just looked it up. According to MC's Keyword Reference, it says...
Closes out the current position at the Close tick of the last bar of the trading session on an intra-day chart; generates the appropriate Market exit order depending on whether the position is long or short.
SetExitOnClose function uses the session closing time specified in the session settings for the symbol in the QuoteManager.
So I'm wondering... if I set the session closing time to be the time I want all open positions to be closed at 4:05 PM EST, according to MC, this function should in fact close out any open positions, right???