This commit is contained in:
2024-06-15 09:00:03 +03:30
parent df1cfae022
commit f1edb81a7e
4 changed files with 68 additions and 19 deletions
+46 -1
View File
@@ -27,11 +27,39 @@
//
// Inputs ...
input group "Weights";
input double w0 = 0.5;
input double w1 = 0.5;
input double w2 = 0.5;
input double w3 = 0.5;
input double w4 = 0.5;
input double w5 = 0.5;
input double w6 = 0.5;
input double w7 = 0.5;
input double w8 = 0.5;
input double w9 = 0.5;
//
// Variables ...
int barsTotal;
//
string mSymbol;
double mVolume;
ENUM_TIMEFRAMES mPeriod;
//
// This is our Data Provider ...
int rsiHandler = INVALID_HANDLE;
double rsi[];
//
double inputs[]; // Storing Inputs
double weights[]; // Storing Weights;
//
double output; // Output Neuron Value
//
// Initialization ...
int OnInit()
@@ -86,7 +114,7 @@ void OnTick()
}
//
//
// Custom Functions ...
//
bool InitialEA()
@@ -94,6 +122,23 @@ bool InitialEA()
//
bool result = false;
//
mSymbol = _Symbol;
mPeriod = _Period;
//
// Initialize RSI Handler ...
rsiHandler = iRSI(
mSymbol,
mPeriod,
14,
PRICE_CLOSE //
);
result = rsiHandler != INVALID_HANDLE;
if (!result) {
return result;
}
//
result = true;