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)
Hi everyone.
Ive recently gotten into using multicharts, and I have one query, which may or may not have already been asked on this forum. Ive searched and found similar stuff, but nothing that answered my query.
What I want to do is chart an instrument using 2 time frames, but trade on a 3rd time frame. i-e, track the movement of an instrument simultaneously on the daily and weekly timeframes, and when a trigger is hit on these timeframes, trade on the 10 minute bar.
How can i do this?
Can you help answer these questions from other members on NexusFi?
On a related note, when I plot the above time frames on a chart window, what does the 'Base Study On' part mean? If Im trading on the 10 min bar while using the information from the daily and weekly bars, which time frame should i 'base study on'?
you are welcome. "Base study on" only comes into play with indicators and I would suggest to base it on the datastream that gives the most updates and adapt the code accordingly. This would also be my suggestion for a signal - use the fastest datastream as data1 and adapt the signal accordingly. If your trade datastream is not the fastest stream on the chart it's usually less hassle to use an additional faster datastream of the same symbol for trade execution and use the "original" trade datastream for generating the signals.
Of course you can make it work when data1 is not the fastest chart, but it's usually harder and more work than doing what I wrote above.
Thanks a lot for your help so far ABCTG......
Im having quite a few issues with multi time frames, so your help is a god-send.
Below is a basic version of the code Im trying to implement. data1 is the daily chart, and data2 is weekly. The signal is supposed to trigger a trade whenever the high bars of the 2 charts are crossed.
However, it doesnt always happen that way. I cant attach a screenshot as I have less than 5 posts..but there are many trades that triggered even though both the high bars were not breached.
Plus, Ive added a condition for max position to be 10, but that doesnt seem to matter either, as the strategy runs away with trades Any ideas?
marketposition can only have one of three values - 0 if you are flat, +1 if you are long and -1 if you are short.
Therefore your condition is always true and the signal keeps adding trades.
You are looking for something like "CurrentEntries".
From looking at your code it's not exactly clear what you are trying to get at - you are using intrabar order generation, but none of the variables is intrabarpersist (which might not be needed, but I thought I'd point it out). Besides that you should tie variables to data2 specifically on declaration in my opinion.
The next thing would be for you to add print statements to your code to debug what exactly the values are at the point of an entry. This will help you figuring out what is happening in your code and what is different than what you want it to do.