Skip to content

Commit

Permalink
feat: Check for available rates in RSI
Browse files Browse the repository at this point in the history
  • Loading branch information
sibvic committed Sep 9, 2024
1 parent 8c5c9dc commit 538ab14
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 30 deletions.
6 changes: 5 additions & 1 deletion snippets/Streams/Oscillators/RSIStream.mqh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#include <Streams/ChangeStream.mqh>
#include <Streams/AStreamBase.mqh>

// RSI stream v1.1
// RSI stream v1.2

#ifndef RSIStream_IMP
#define RSIStream_IMP
Expand Down Expand Up @@ -46,6 +46,10 @@ public:
bool GetValue(const int period, double &val)
{
int totalBars = _source.Size();
if (totalBars == 0)
{
return false;
}
if (ArrayRange(_pos, 0) != totalBars)
{
ArrayResize(_pos, totalBars);
Expand Down
29 changes: 0 additions & 29 deletions snippets/Streams/RSIStream.mqh

This file was deleted.

0 comments on commit 538ab14

Please sign in to comment.