RSI bot question
RSI bot question
02 Jun 2013, 11:44
I have a plan for an RSI based robot.
I was trying to get it to print to the log what values it recives so I can integtrate the decision tree I have for setting up trades.
I made a testing addition to the rsi sample bot code:
protected override void OnTick()
{
if (Trade.IsExecuting) return;
if (rsi.Result.LastValue < 30)
{
OpenPosition(TradeType.Buy);
Print ("Buy {00}",rsi.Result.LastValue);
}
else if(rsi.Result.LastValue > 70)
{
OpenPosition(TradeType.Sell);
Print ("Sell {00}",rsi.Result.LastValue);
}
}
When i got the results log all i saw was
(Datetime) Sell 100
(Datetime) Buy 0
I am a little stumped, How do i get the decimal number I see charted when it's in an EA?
I have tried several methods and got NaN for my troubles.
Any ideas?
Thanks for the info
Gary
Replies
cAlgo_Fanatic
05 Jun 2013, 10:42
Can you please send us your code to engage@spotware.com.
@cAlgo_Fanatic
cAlgo_Fanatic
04 Jun 2013, 11:10
Are you using period = 1 for the RSI?
You can look at the code for the RSI here to better understand the results.
@cAlgo_Fanatic