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 simply load a chart with with the same symbol three times. Place each symbol on it's own subchart and timeframe. Place the daily as the primary chart to trade from. Place the weekly on subchart 2 and the monthly on subchart 3. You can then access all timeframes within a function (RSIalert) as demonstrated below.
I have a similar problem and have tried similar solution as yours but get wrong result and can not get why?
Here is my problem:
I have written a function called "Rico.F" that is true if Close<Range*0,1 and are lowest low then 5 last period.
Then I want to buy when yesterday (daily chart), AND first hour at next day (1-hour chart), AND frist 15-min after that first hour (15- min chart) all have Rico=true.
I have 15-min as data1, 1-H as data 2 and daily as data3.
As I can see, just the 15-min Rico is correct and I cannot figur out how the code can get true result for those other in my result.
Is this some issue that you recognize?
Thanks for any clue in advance
I would start with tying the functions to the datastreams when you call them. If you don't do that, they will be computed on data1 (although they use some values of your other datastreams).
You should be able to find examples for that here in the forum or in the help files (the last lines of this article show how to do it for example: FundValue (Function)).
The next step would be to add print statements to your code, so you can find out what values it uses and where it goes wrong.
I would start with tying the functions to the datastreams when you call them. If you don't do that, they will be computed on data1 (although they use some values of your other datastreams).
You should be able to find examples for that here in the forum or in the help files (the last lines of this article show how to do it for example: FundValue (Function)[/url]).
The next step would be to add print statements to your code, so you can find out what values it uses and where it goes wrong.
Regards,
ABCTG
Thans for your replay,
As you mention, I have a parameter in my function "DataSerie" which is the number of data stream.
I pass the numbers 1 to 3 for data1 to data3.
Do you see any thing wrong in that code or do you mean that it is not the correct way to make the function using different data stream?
Please refer to the link I posted above and you will see how to tie the function to the datastream (which is not what you do with your code - it's missing that). Not tying the function to a specific datastream will result
in the function being executed in alignment with data1. This means that accessing a function value of [1] would give you the value the function had on the previous data1 bar and not on the previous data2 or data3 bar as you might expect. If you are fine with that, then no changes would be needed. In that case I'd still suggest to add the print statements (or to plot the function values), so you can track down what is going on more easily.
Regards,
ABCTG
ShahramTor
Thans for your replay,
As you mention, I have a parameter in my function "DataSerie" which is the number of data stream.
I pass the numbers 1 to 3 for data1 to data3.
Do you see any thing wrong in that code or do you mean that it is not the correct way to make the function using different data stream?
Please refer to the link I posted above and you will see how to tie the function to the datastream (which is not what you do with your code - it's missing that). Not tying the function to a specific datastream will result
in the function being executed in alignment with data1. This means that accessing a function value of [1] would give you the value the function had on the previous data1 bar and not on the previous data2 or data3 bar as you might expect. If you are fine with that, then no changes would be needed. In that case I'd still suggest to add the print statements (or to plot the function values), so you can track down what is going on more easily.
Regards,
ABCTG
Yes you are right!
I get information about data1 instead of data2 and data3.
I will try to test the function "FundValue(FundFieldName,PeriodsAgo,oErrorCode)" as you mentioned.
I need to read the Low, High and the Close of datastrams but do not find any "FundFieldName" associated to them (yet).
Sorry that I am such a beginner regarding EL, but I get error while compiling my code with "FundValue"!
------ Compiled with error(s): ------
Unknown Function
the link was just supposed to be an example of how to tie a function to a datastream (more specifically the last example in the link shows you how to do it). I didn't mean that you should use the FundValue function, as it will not give you what you are looking for.
By the way you can show your appreciation for posts on NexusFi by clicking the "Thanks" button next to a post.