I've been using a modified form of RSI Agita (on an intraday basis) and would now like to work the short (overbought) side as well. To that end I "edited" the script to reverse directions. The script "compiles" properly but I've obviously missed something / done something in error b/c I can get no performance data;( I don't understand the function of the line:
CODE:
Please log in to see this code.
which I took to mean the lowest Rsi level that the program would buy )
Here is my "amended script" - please could somebody shoot down my bugs
CODE:
Please log in to see this code.
Thanks
Size:
Color:
QUOTE:
CODE:
Please log in to see this code.
which I took to mean the lowest Rsi level that the program would buy )
No, this is an alternate way of saying "level = level - 5" in C#. You may want to take a look at the C# resources enumerated under "How do I start with C# ?" in
WL5Wiki FAQs.
Therefore the following line will be adding 95 to level on every iteration of the loop instead of setting the upper boundary:
CODE:
Please log in to see this code.
Size:
Color:
I'll carve some time out to invest in a C++ tutorial
Does that line instruct the program to add to positions for each 5 level change down?
(where "level" means rsi?)
So, if the script above were to be changed to :
level+=5;
would that be correct for a program which was looking to short overbought "levels"
Is there anything else that is incorrect in my script?
Size:
Color:
Here are the corrections (there are several)
CODE:
Please log in to see this code.
Size:
Color:
Brilliant
except the compiler would not let the script say:
int level = overbought.ValueInt;
so, I changed it to:
level = overbought.ValueInt;
and it seems to work well
Thanks
Size:
Color:
It's because you didn't copy the entire script that I posted. You should.
Size:
Color:
I've wroten this short strategy and apply it in a stock, intraday 15...the last entrance of the strategy was in 19/5/2008 and my data base is until 29/1/2009...Do anyone know why? many times the RSI was over 70 during a long tme... TKX
Size:
Color:
Size:
Color:
The stock is the Brazilian future indice . When i put this stategy on him, intraday 15 minutes, there are some trades at de biginning and it stops at 19/5/2008...I.ven t understand why...
Size:
Color:
another question for this strategy...how to modify the buying and selling instructions to be done at the close of the candle? sometimes the conditions to get out of the trading are ok in the last candle of the day and the strategy only says to operate at bar +1...TKX
Size:
Color:
FOr the last question I ' ve just find the solution..it was simple but i 'm starting in this strategy programs..sorry...
Size:
Color:
Since there's only one exit rule and you don't feel like sharing your position sizing settings with us:
CODE:
Please log in to see this code.
Let me then suppose that RSI never crosses below 30.
QUOTE:
how to modify the buying and selling instructions to be done at the close of the candle?
Change the exit line to use
CoverAtClose and
bar.
Size:
Color:
For the RSI AGITA transformed in short : at the begining of 2008..many short position were taken and closed when the RSI was closing under the limit 30 specified. the last entrance was on 19/5/2008, closed on 23/5/08. After this date, many times the RSI was up to my limit 70 and no selling position was iniciated until today...If you want the data base i can send it to you.... :-)
Size:
Color:
1) Look for open positions still not closed.
2) We don't need your database, but indicating your position sizing settings could help (see link in my post @
2/1/2009 2:09 PM).
Size:
Color:
Eugene, all the position are closed since 23/5/2008...that s the problem...
Size:
Color:
Thank you for sending us your data file.
The CrossOver condition is not unique - apart from it, there are more rules that affect will the trade triggered or not. The Volume comparison rule is not applicable in your case, since your data series has no volume.
The key condition is that closing prices should be higher than last position entry price.
Add this line right below the
int level = ... declaration:
CODE:
Please log in to see this code.
And you'll see that your lastEntryPrice is equal to
74230 when the trades stopped. Your futures market has dropped to 30,000-40,000 since then, so taking new trades is not an option.
P.S. Another strong reason for not taking trades can usually be in position sizing settings, but here it's not the case.
Size:
Color:
Hi Eugene, tkx for your help...I ve forgotten to tell you that I had suppress the condition of volume because has you said, I don t use this data, so you re right.
I understand what you tell me about "the key condition is that closing prices should be higher than last position entry price"... Ok, so I would like to change it, as it is in the RSI AGITA (inicial strategy for long positions)...If you see the first strategy , the closing price should be lower than last position entry price but only DURING THE TRADE...so what must I modify in this way?
Size:
Color:
QUOTE:
Ok, so I would like to change it, as it is in the RSI AGITA (inicial strategy for long positions)...If you see the first strategy , the closing price should be lower than last position entry price but only DURING THE TRADE...so what must I modify in this way?
CODE:
Please log in to see this code.
Size:
Color:
Eugene..no trades are done now...where is the problem?
CODE:
Please log in to see this code.
Size:
Color:
CODE:
Please log in to see this code.
Well, I'm not following this entire thread, but the problem has to do with the lastEntryPrice filter condition.
Size:
Color:
Wonderful :-))...
One more question...if I run a strategy the performance is always very superior os the Profit$ shown in the "trades"...could you say me why?
Size:
Color:
Oops. I mistakenly read Jojo142's idea the other way as "
last position entry price should be lower than the closing price..." - therefore the .MaxValue and not .MinValue.
Good that Jojo142 noticed that and ignored my incorrect change:
QUOTE:
//if (Bars.Close[bar] > lastEntryPrice)
if (Bars.Close[bar] < lastEntryPrice)
Size:
Color:
Wonderful :-))...
One more question...if I run a strategy the performance is always very superior os the Profit$ shown in the "trades"...could you say me why?
for example in this strategy : Performance shown 119000 points, if I look at the trades, only 2500 points...why the diference?
Size:
Color:
QUOTE:
if I look at the trades, only 2500 points
In the Trades list, what you see is a per-trade profit. On the other hand, the Performance tab shows an aggregated figure.
P.S. When copying to Excel/OpenOffice/whatever, make sure that all values are numerical and not marked as textual.
Size:
Color:
That was the point...
TKX a lot, Eugene , Cone...
Size:
Color: