Any rookie question, so as not to clutter up the forum. Professionals, don't pass by. Nowhere without you - 6. - page 45

 
satorifx :

Thank you for the incredibly detailed response.

Do you really need to be a smart aleck to understand that if a new person comes to the forum with a question, he needs a specific solution or a link to something similar, rather than a dumb excuse that "anything is possible"?

So, he accurately and briefly answered the question. There was nothing about the code in the question.

This is not the right place to go for writing code. People who write their own code get help here. This is the place for you.

 
Zhunko :

You shouldn't have come to this thread for writing code. People who write their own code get help here. It's your place.

I am able to write myself. I have written things that are much more complicated.
artmedia70 :

Those who try to do something on their own get help here. They direct you in the right direction, explain etc. ...

You asked a question and you got an answer. Have you tried to start writing something yourself?

I write myself and often. The problem is that after digging through all of the mql4 help, I haven't found anything even close to the solution of my question. I need to know what to start with, that's why I've come here for help.

So, how can I change the parameters of the indicator in the script code? I am specifically interested in the ZigZag indicator.
 
satorifx :
I am able to write it myself. I've written things that are much more complicated. I write them myself and often. The problem is that having dug through the whole mql4 manual I haven't found anything that even approximately resembles the solution of my question. I need to know what to start with, that's why I've come here for help.

So, how can I change the parameters of the indicator in the script code? I am specifically interested in the ZigZag indicator.

You can through:

1. Global variables.

2. Through a file.

3. mapping.

4. If the indicator and script are on the same chart, you can use graphical objects. Here's more.

 

Good afternoon, my question got lost, I will repeat it

Can I make a window indicator with some information drawn in a chart (for example, MACD in the window and arrows at crossing of lines in the chart)?

and also, preferably arrows should not be objects, but an indicator.

P.S. I am solving the problem with the help of a template, but it is not very convenient, because I have to constantly change the parameters of both indicators, I'm testing

 
Merincool :

Good afternoon, my question got lost, I will repeat it

Can I make a window indicator with some information drawn in a chart (for example, MACD in the window and arrows at crossing of lines in the chart)?

and also, preferably arrows should not be objects, but an indicator.

P.S. I solve the problem with the help of a template, but it is not very convenient, because I have to change parameters of both indicators all the time.

One indicator can draw buffers only in one subwindow.

I.e. from one indicator you can draw buffers in its subwindow and graphical objects in another one, for example.

 

Good afternoon. I came across an interesting trading strategy on the internet. But it is paid. Maybe this is really the author's work, but may be they just found it on the Internet and not very educated traders are buying it). I want to know your opinion, esteemed traders. I want to know your opinion, dear traders, if it is realistic to find all those indices that are shown in the screenshot on the Internet and make such a system by myself?



 
Zhunko :

One indicator can only draw buffers in one sub-window.

I.e. one indicator can draw, for example, buffers in its subwindow and graphic objects in another one.


Sorry, thanks for the reply.

Do you have a code for drawing objects, because I can't really master coding, I may just try to understand what I want and insert it into my code, but I don't think I can do it myself

I would be VERY grateful.

 

Help me fix the errors, I'm new to this, so don't judge me harshly.

//=============== Меню ===============================================
extern double Lot = 0.1;
extern double RSI;
extern double CCI;
extern double Stochastic;
extern int TakeProfit = 20;
extern int StopLoss = 10;
//============== Переменные ==========================================

double NewBuy;
double NewSell;


int t;
//+------------------------------------------------------------------+
//| expert initialisation function |
//+------------------------------------------------------------------+
int init()
{
//----
//----
return(0);
}
//+------------------------------------------------------------------+
//| expert deinitialisation function |
//+------------------------------------------------------------------+
int deinit()
{
//----
//----
return(0);
}
//+------------------------------------------------------------------+
//| expert start function |
//+------------------------------------------------------------------+
int start()
{

//======== get data from the indicator =============================
{
double RSI = iRSI(NULL,0,14,PRICE_CLOSE,0);
double CCI = iCCI(NULL,0,12,PRICE_TYPICAL,0);
double Stochastic = iStochastic(NULL,0,8,3,3,MODE_SMA,0,MODE_MAIN,0);
RefreshRates();
}
// ================= Signal Processing ==============================
{//2
if (iRSI(NULL,0,14,PRICE_CLOSE,0)>iRSI(NULL,0,14,PRICE_CLOSE,1)&&
iCCI(NULL,0,12,PRICE_TYPICAL,0)>iCCI(NULL,0,12,PRICE_TYPICAL,1)&&
iStochastic(NULL,0,8,3,3,MODE_SMA,0,MODE_MAIN,0)>iStochastic(NULL,0,8,3,3,MODE_SMA,0,MODE_SIGNAL,0)
NewBuy=1; else NewBuy=0;
if (iRSI(NULL,0,14,PRICE_CLOSE,0))<iRSI(NULL,0,14,PRICE_CLOSE,1)&&
iCCI(NULL,0,12,PRICE_TYPICAL,0)<iCCI(NULL,0,12,PRICE_TYPICAL,1)&&
iStochastic(NULL,0,8,3,3,MODE_SMA,0,MODE_MAIN,0)<iStochastic(NULL,0,8,3,3,MODE_SMA,0,MODE_SIGNAL,0) NewSell=1; else NewSell=0;
}//2
// ================= Open a trade =================================
{//3
// BUY opening
if (NewBuy == 1 && OrdersTotal() == 0)
{
t=OrderSend(Symbol(),OP_BUY,Lot,Ask,3,0,0,0,Blue);
Sleep (5000);
OrderModify (t,OrderOpenPrice(),(Ask-Point*StopLoss),(Ask+Point*TakeProfit),0,Red);
}
//open Sell
if (NewSell == 1 && OrdersTotal()==0)
{
t=OrderSend(Symbol(),OP_SELL,Lot,Bid,3,0,0,0,OrangeRed);
Sleep (5000);
OrderModify (t,OrderOpenPrice(),(Bid+Point*StopLoss),(Bid-Point*TakeProfit),0,Red);
}
}//3
//END
return(0);
}
//+------------------------------------------------------------------+
 
zipkain:

Help me correct my mistakes, I'm new at this, so don't judge me too harshly.

//=============== Меню ===============================================
extern double Lot = 0.1;
extern double RSI;
extern double CCI;
extern double Stochastic;
extern int TakeProfit = 20;
extern int StopLoss = 10;
//============== Переменные ==========================================


double NewBuy;
double NewSell;




int t;
//+------------------------------------------------------------------+
//| expert initialization function |
//+------------------------------------------------------------------+
int init()
{
//----
//----
return(0);
}
//+------------------------------------------------------------------+
//| expert deinitialization function |
//+------------------------------------------------------------------+
int deinit()
{
//----
//----
return(0);
}
//+------------------------------------------------------------------+
//| expert start function |
//+------------------------------------------------------------------+
int start()
{


//======== получение данных с индикатора =============================
{ 
double RSI = iRSI(NULL,0,14,PRICE_CLOSE,0);
double CCI = iCCI(NULL,0,12,PRICE_TYPICAL,0);
double Stochastic = iStochastic(NULL,0,8,3,3,MODE_SMA,0,MODE_MAIN,0);
RefreshRates();
}
// ================= Обработка сигналов ==============================
{//2
if (iRSI(NULL,0,14,PRICE_CLOSE,0)>iRSI(NULL,0,14,PRICE_CLOSE,1)&&
iCCI(NULL,0,12,PRICE_TYPICAL,0)>iCCI(NULL,0,12,PRICE_TYPICAL,1)&&
iStochastic(NULL,0,8,3,3,MODE_SMA,0,MODE_MAIN,0)>iStochastic(NULL,0,8,3,3,MODE_SMA,0,MODE_SIGNAL,0)
NewBuy=1; else NewBuy=0;
if (iRSI(NULL,0,14,PRICE_CLOSE,0))<iRSI(NULL,0,14,PRICE_CLOSE,1)&&
iCCI(NULL,0,12,PRICE_TYPICAL,0)<iCCI(NULL,0,12,PRICE_TYPICAL,1)&&
iStochastic(NULL,0,8,3,3,MODE_SMA,0,MODE_MAIN,0)<iStochastic(NULL,0,8,3,3,MODE_SMA,0,MODE_SIGNAL,0) NewSell=1; else NewSell=0;
}//2
// ================= Открытие сделки =================================
{//3
// открытие BUY
if (NewBuy == 1 && OrdersTotal() == 0)
{
t=OrderSend(Symbol(),OP_BUY,Lot,Ask,3,0,0,0,0,Blue);
Sleep (5000);
OrderModify (t,OrderOpenPrice(),(Ask-Point*StopLoss),(Ask+Point*TakeProfit),0,Red);
}
// открытие Sell
if (NewSell == 1 && OrdersTotal()==0)
{
t=OrderSend(Symbol(),OP_SELL,Lot,Bid,3,0,0,0,0,OrangeRed);
Sleep (5000);
OrderModify (t,OrderOpenPrice(),(Bid+Point*StopLoss),(Bid-Point*TakeProfit),0,Red);
}
}//3 
//END
return(0);
}
//+------------------------------------------------------------------+
Use SRC for MQL4 code and everyone can figure it out and help you!
 

Hello everyone. I am new to trading, I am sitting on demo with Expert Advisors, but I want to start real with $45. I am testing EAs for now, so I want to use signals. I use MT4. I have selected a list from which I would like you to help me choose the best signal. Here is the list:

https://www.mql5.com/ru/signals/10276

https://www.mql5.com/ru/signals/11021

https://www.mql5.com/ru/signals/6283

https://www.mql5.com/ru/signals/10964

https://www.mql5.com/ru/signals/9649

Reason: