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)
if rsi (c,length) <= 30 and condition1 and condition2 and condition3 and condition4 and condition5 then begin
buy ("Enter long 50") 50 shares next bar at market;
end;
end;
if marketposition = 1 then begin
if rsi (c, length) <= 20 and condition1 then begin
buy ("Enter long 100") 100 shares this bar at close;
end;
end;
if rsi(c,length) >= 55 then sell this bar at close;
Can you help answer these questions from other members on NexusFi?
you should look into the reserved word "currentdate" and what it returns - assuming you also want to be able to backtest your code of course.
What are your settings for multiple entries into the same position? Maybe you are just blocking more than one entry.
The value wil be 1081030 if the current date is October 30th, 2008.
The 108 is the number of years ago form the reference so the 108[10]30 means the month. Since the <> 5 didnīt work I tried:
condition2 = currentdate(month) <> 500;
and condition2 = Month (currentdate) <>500;
and condition2 = month <> 500;
Still doesnt work.
Regarding the multiple entries I have to look into that further, no instructions are found but it seems I have to defined the entries as parameters in the inputs.
that's correct, but you seem to miss the most important part in the definition. It doesn't return the chart date, but the current (i.e. today's) date of your computer, which most likely will be the same over all the bars on your chart.