Questions from Beginners MQL5 MT5 MetaTrader 5 - page 78

 
R0MAN:

This article is a help.

Change double iFractals(string symbol, int timeframe, int mode, int shift) in four to

Thank you
 
R0MAN:

I have little experience with MQL5 so far, I have reviewed the MQL5 Timeframe Guide but did not find anything useful.

I have a problem: I have a fractal indicator that works on one timeframe and I want to get its data on 2 different timeframes.

I have it like this:

#include <GetIndicatorBuffers.mqh>

int Fractals_handle; // pointer to the iFractals indicator
string period; // variable for different timeframes of the chart

void OnTick()

{

//---- indicator buffers for B. Williams' Fractals

static double Upper[]; // array for UPPER_LINE indicator iFractals, it is an array for the upper fractals

static double Lower[]; // array for the LOWER_LINE indicator iFractals, it is an array for the lower fractals

for( int j=1; j<=2; j++ )
{

if( j==1 ) period=PERIOD_H1;
if( j==2 ) period = PERIOD_H4;

//--- create a pointer to the iFractals indicator object

Fractals_handle=iFractals(NULL,period );


//--- if an error occurred while creating the object, print the message

if(Fractals_handle<0)
{
Print("The iFractals object was not created: Execution error = ",GetLastError());
//--- forced program termination
return(-1);

}

//--- set the arrays indexing order as in timeseries
//--- if an error occurs, stop any further operations
//--- filling declared arrays with current values from all indicator buffers for fractals

if(!GetFractalsBuffers(Fractals_handle,0,100,Upper,Lower,true)) return;

// here is the line of check of the indicator work

} // loop end by J


If the loop over j is removed in the above code and a concrete period is inserted into the Fractals_handle=iFractals(NULL,period ); function, the program will work.

In the loop, it generates an error during compilation:

'period' - unexpected token Sov_MA_ADX.mq5 482 47

Please advise where is my mistake and how to correctly format this part of the program.


 
Hello, Mr. Professionals, I've recently started to study MT5 intensively, I'm testing all possible variants. I started to open some positions in the trend, but then they start moving in the other direction and as the result they are falling dramatically, even taking into consideration the long wait and hope that everything will go right and I will be happy. Would it be possible to make such an expert that would open a position with a 4 or even 10 point delay, i.e. if it did not move in the direction it was supposed to move to, thank God. In general, if I think about it, it turns out the same way and "We can't predict????", but I guess it happened twice a day with more than 100%. So how do I get into this stream and follow it? At the post office lately began receiving letters offering to buy the so-called "Grails". How did they find out about my mail and, most importantly, about my interest in this business?
 
chipo:
Hello Mr. Masters, I've just started to study MT5 intensively, I'm testing all possible options here. I usually open profit by trend but then they start moving to the other side and as a result I get losses even if I wait too long and hope everything will go right and I will be happy. Would it be possible to make such an expert that would open a position with a 4 or even 10 point delay, i.e. if it did not move in the direction it was supposed to move to, thank God. In general, if I think about it, it turns out the same way and "We can't predict????", but I guess it happened twice a day with more than 100%. So how do I get into this stream and follow it? At the post office lately began receiving letters offering to buy the so-called "Grails". How did they find out about my mail and, most importantly, about my interest in this business?

They are grails for the sellers, because they help you pull your money out.

Learn from professionals, watch interviews with people involved in trading, forex and most importantly algotrading, what they have to say about what you can earn.

The idea you described is just a methodology of entering a position. The important thing is to find a signal that, say, at the same stops and profits provides 65% + profitable trades. And then you can find the best input and money management. It cannot be done in any other way.) It's like building a car without an engine.

 
MrGold166:

They are grails for the sellers, because they help you get your money out.

Learn from professionals, watch interviews with people involved in trading, forex and most importantly algotrading, what they have to say about what you can earn.

The idea you described is just a methodology of entering a position. The important thing is to find a signal that, say, at the same stops and profits provides 65% + profitable trades. And then this signal may lead to the best input and money management. It cannot be done in any other way.) It's like building a car without an engine.

I read, I especially liked Williams with his "Trading Chaos" - some kind of magic book, while you read it all I get, then you forget it all again - I reread it three times and it feels like the first time, but money management is more complicated, I've never heard of algorithmic trading, but as I understand all programs are written with an algorithm - also a framework and the market is a free will of non-opposed parties. If you take candlesticks - it is the most profitable part of the market, but I have not come across any candlestick Expert Advisor - on the contrary, they try to filter it out. Once someone bragged on RBC.TV that they are earning hundredths of a percent with lots of robots on any market change and as a result they have up to 10 000%. This, too, is fantastic - you can lower the whole system in such a way - to pump out all the money with such a pump, we would like to have at least 5-10% per month.
 

Hello professionals, Happy New Year.

Please advise me how to deal with the situation with time lag between opening of bars in the Strategy Tester and opening of bars of the timeframe.

For example, I set in my Expert Advisor the beginning of testing on 13.01.2011. In this case, the opening time of the first bar in the Strategy Tester on the hour timeframe will be 2011.01.13 00:00:00,

and the opening time of the first bar in the Expert Advisor using the function

i=CopyTime( _Symbol,0,1,100,Time_buf); // copy the historical data time for each bar of H1 timeframe into the buffer
if( i<0 )
{
Print(" failed to copy time values from the price chart buffer ");

}

get Time_buf[0] = 2011.01.12 23:00:00 - 1 hour delay.

I understand this situation is standard and it has been solved by many experienced traders. Are there any publications on this subject? I have not found any solution in the articles.

Or share your experience, please.



 
Boris.45:

Please suggest a way out of the situation, which is related to the time lag between the moments of opening bars in the tester and the bars of the timeframe being formed.

You set this backlog yourself, try it this way:

i=CopyTime( _Symbol,0,0,100,Time_buf);
 
avoitenko:

You set this backlog yourself, try it this way:

Thank you very much for the advice. Very much appreciated.

 
Good afternoon, could you tell me how to transfer a signed signal to my metatrader?
 
Please tell me how to implement access to the buffer of one indicator, running on the chart of another indicator
Specifically, I need access to the MA buffer on the Standart Deviation indicator
Reason: