Posts made by ItzShahzad.X
-
RE: why the robob dont work for manually opened positions?posted in Questions & Answers
@behrouz1354 It is only used for trade management, If our psychology is not strong, this Robot will automatically manage the trade
-
RE: why the robob dont work for manually opened positions?posted in Questions & Answers
@behrouz1354 bro please shear with me
-
RE: delete pending when trade closedposted in Questions & Answers
@MT4stefano On Trade > Trade closed > Delete pending orders

-
RE: optimization fail with objectposted in Questions & Answers
@dabidabi Please send your project link
-
RE: create ea hegeposted in Questions & Answers
@huythai If you want to make Fxdreema, watch this video
-
RE: Telegram to MT5 orderposted in Questions & Answers
@PlugPong Sir i don't have any idea about FxDreema can make it mandatory by coding in MQL5
-
RE: Telegram to MT5 orderposted in Questions & Answers
@PlugPong That is, you want to send an order from Telegram in mt5?
-
RE: This what i need help withposted in Questions & Answers
@Domas1988 Sir, your point is fine, but tell us what strategy we should use
-
RE: This what i need help withposted in Questions & Answers
@Domas1988 Sir I have invested a lot of time in your project but I have not found any error in it, I have tried a lot but can't find the error. If you like it, you can share the strategy with me so that I can Code again
-
RE: This what i need help withposted in Questions & Answers
@ItzShahzad-X ```
//+------------------------------------------------------------------+
//| neuro-example.mq5 |
//| Copyright 2012, MetaQuotes Software Corp. |
//| http://www.mql5.com |
//+------------------------------------------------------------------+
#property copyright "Copyright 2012, MetaQuotes Software Corp."
#property link "http://www.mql5.com"
#property version "1.02"#include <Trade\Trade.mqh> // Include the library for trade execution
#include <Trade\PositionInfo.mqh> // Include the library for position info//--- Input parameters
input double w0 = 0.5; // Weight 0
input double w1 = 0.5; // Weight 1
input double w2 = 0.5; // Weight 2
input double w3 = 0.5; // Weight 3
input double w4 = 0.5; // Weight 4
input double w5 = 0.5; // Weight 5
input double w6 = 0.5; // Weight 6
input double w7 = 0.5; // Weight 7
input double w8 = 0.5; // Weight 8
input double w9 = 0.5; // Weight 9input double TakeProfit = 50; // Take Profit in pips
input double StopLoss = 50; // Stop Loss in pips//--- Variables
int iRSI_handle; // RSI indicator handle
double iRSI_buf[10]; // Buffer for RSI valuesdouble inputs[10]; // Array for normalized inputs
double weight[10]; // Array for weightsdouble out; // Output of the neuron
string my_symbol; // Trading symbol
ENUM_TIMEFRAMES my_timeframe; // Timeframe
double lot_size; // Lot size for tradesCTrade m_Trade; // Trade object
CPositionInfo m_Position; // Position info object//+------------------------------------------------------------------+
//| Expert initialization function |
//+------------------------------------------------------------------+
int OnInit()
{
my_symbol = Symbol(); // Current chart symbol
my_timeframe = PERIOD_CURRENT; // Current timeframe
lot_size = SymbolInfoDouble(my_symbol, SYMBOL_VOLUME_MIN); // Minimum lot size// Apply RSI indicator iRSI_handle = iRSI(my_symbol, my_timeframe, 14, PRICE_CLOSE); // Check if RSI handle is valid if (iRSI_handle == INVALID_HANDLE) { Print("Failed to get the indicator handle, Error: ", GetLastError()); return INIT_FAILED; } // Add RSI indicator to chart and set buffer as time series ChartIndicatorAdd(ChartID(), 0, iRSI_handle); ArraySetAsSeries(iRSI_buf, true); // Initialize weights weight[0] = w0; weight[1] = w1; weight[2] = w2; weight[3] = w3; weight[4] = w4; weight[5] = w5; weight[6] = w6; weight[7] = w7; weight[8] = w8; weight[9] = w9; return INIT_SUCCEEDED;}
//+------------------------------------------------------------------+
//| Expert deinitialization function |
//+------------------------------------------------------------------+
void OnDeinit(const int reason)
{
IndicatorRelease(iRSI_handle); // Release RSI handle
// No dynamic memory to free for iRSI_buf
}//+------------------------------------------------------------------+
//| Expert tick function |
//+------------------------------------------------------------------+
void OnTick()
{
// Copy latest 10 RSI values into the buffer
if (CopyBuffer(iRSI_handle, 0, 0, 10, iRSI_buf) <= 0)
{
Print("Failed to copy data from the indicator buffer, Error: ", GetLastError());
return;
}double d1 = 0.0, d2 = 1.0; double x_min = iRSI_buf[ArrayMinimum(iRSI_buf)]; double x_max = iRSI_buf[ArrayMaximum(iRSI_buf)]; // Normalize RSI values for (int i = 0; i < ArraySize(inputs); i++) { inputs[i] = (((iRSI_buf[i] - x_min) * (d2 - d1)) / (x_max - x_min)) + d1; } out = CalculateNeuron(inputs, weight); // Calculate neuron output double currentPrice = SymbolInfoDouble(my_symbol, SYMBOL_BID); double tpPrice, slPrice; if (out < 0.5) { // Close any existing Sell position if (m_Position.Select(my_symbol)) { if (m_Position.PositionType() == POSITION_TYPE_SELL) m_Trade.PositionClose(my_symbol); if (m_Position.PositionType() == POSITION_TYPE_BUY) return; // Do nothing if a Buy position exists } // Buy setup tpPrice = currentPrice + (TakeProfit * _Point); slPrice = currentPrice - (StopLoss * _Point); m_Trade.Buy(lot_size, my_symbol, slPrice, tpPrice); } else if (out >= 0.5) { // Close any existing Buy position if (m_Position.Select(my_symbol)) { if (m_Position.PositionType() == POSITION_TYPE_BUY) m_Trade.PositionClose(my_symbol); if (m_Position.PositionType() == POSITION_TYPE_SELL) return; // Do nothing if a Sell position exists } // Sell setup tpPrice = currentPrice - (TakeProfit * _Point); slPrice = currentPrice + (StopLoss * _Point); m_Trade.Sell(lot_size, my_symbol, slPrice, tpPrice); }}
//+------------------------------------------------------------------+
//| Neuron calculation function |
//+------------------------------------------------------------------+
double CalculateNeuron(double &x[], double &w[])
{
double NET = 0.0;
for (int n = 0; n < ArraySize(x); n++)
{
NET += x[n] * w[n]; // Calculate weighted sum
}return ActivateNeuron(NET); // Activation function}
//+------------------------------------------------------------------+
//| Activation function |
//+------------------------------------------------------------------+
double ActivateNeuron(double x)
{
return 1.0 / (1.0 + exp(-x)); // Sigmoid function
} -
RE: This what i need help withposted in Questions & Answers
@Domas1988 Here is the source code of Gup and I have added take profit and stop Loss 1.mq5

-
RE: This what i need help withposted in Questions & Answers
@Domas1988 Sir i have added take profit and stop loss in it but tell me how it works ?
-
RE: All Comment add on the chart ?posted in Questions & Answers
@VHV-Profit-Masters This was done by mistake


