[WARNING CLOSED!] Any newbie question, so as not to clutter up the forum. Professionals, don't go by. Can't go anywhere without you. - page 6

 

Question on the tester. When testing at the beginning of each bar I, for example, call High or Low. Will I get back what? The current simulated values, or will I be able to look into the future of the current bar and know the final result?

 
Hello Gentlemen Professionals!

Finally my brain has figured out how to install an EA, but,

I've installed Rabbit3 - run it, set autotrade permission. I've got Rabbit3 here, I've got a Buy or Sell order. Lot 0.01, Sell and Buy buttons are inactive, and when I change lot to 0.1, "Not enough money". What should I do? Is this EA capable of micro lot trading or not?
 
Who knows what he has in mind, you know best. And saying there isn't enough money means there really isn't enough. Add a test deposit and enter with the minimum lot.
 
KING >> :

Question on the tester. When testing at the beginning of each bar I, for example, call High or Low. Will I get back what? The current simulated values, or will I be able to look into the future of the current bar and know the final result?

The current value will be returned.

And not just by the native symbol.

The developers truncated the possibilities of looking deep into the history as much as they could.

Tester Grails are harder to build, but still possible.

 

//+------------------------------------------------------------------+
//| expert start function |
//+------------------------------------------------------------------+
int start()
{
//----
double MA = NormalizeDouble(iMA(NULL, 0, MAPeriod, MAShift, MODE_EMA, PRICE_MEDIAN, 1), Digits);

if(Open[1] > MA && Close[1] < MA)
if(CheckOrders(OP_SELL))
{
if(!OrderSend(Symbol(), OP_BUY, Lots, Ask, 3, 0, 0, NULL, MagicNumber))
Print("Buy order not opened. Error #", GetLastError());
}

if(Open[1] < MA && Close[1] > MA)
if(CheckOrders(OP_BUY)
{
if(!OrderSend(Symbol(), OP_SELL, Lots, Bid, 10, 0, 0, NULL, MagicNumber))
Print("Sell order not opened. Error #", GetLastError());
}
//----
return(0);
}
//+------------------------------------------------------------------+


This is what's written in the start function. Price crosses MA from bottom to top - buy; price crosses MA from top to bottom - sell.

if(Open[1] > MA && Close[1] < MA) is a self-condition. I do not know why it is so. The condition "price crosses MA downwards - sell" is itself a Sell condition, i.e. SHELL (Open[1]>MA). The price (open) on the first bar is greater than the value of MA and the price (close) on the first bar is less than the value of MA.

WHY is it added to the condition Close[1] > MA?

I apologize for such a simple question. But after reading the articles:

-MQL4 Language for Dummies. Custom Indicators (Part 1 and Part 2)



-MQL4 Language for Dummies. Technical Indicators and Built-in Functions



-MQL4 for Dummies. Complex questions in simple terms



-MQL4 for Dummies. Getting Started



I have already drawn my own conclusions (about the trading conditions). The subject is well described in the articles, but they seem to be not so clear.

In my opinion, we need more different examples.

For myself, I have come to the conclusion that we should start with practice and spell out......

Good example of an Expert Advisor based on MACD, but if the authors had prepared some examples of Expert Advisors (for beginners or dummies) based on MA and SSI, stochastic and ADX, etc., it would be easier to master the material......

 
igrok2008 писал(а) >>

This is what is prescribed in the start function. Price crosses MA from bottom to top - buy, price crosses MA from top to bottom - sell.

if(Open[1] > MA && Close[1] < MA) is the condition itself. I do not know why it is so. The condition "price crosses MA downwards - sell" is itself a Sell condition, i.e. SHELL (Open[1]>MA). The price (open) on the first bar is greater than the value of MA and the price (close) on the first bar is less than the value of MA.

WHY is added to the condition Close[1] > MA?

Re-define intersection. Intersection is: the wave was below the price, became higher than the price, therefore there was a crossover, these two points are required to describe the intersection! This is the fact of intersection and this is what is described by the construction:

if (Open[1] > MA (at the beginning of the bar the price is greater than ma1) &&(and) Close[1] < MA(at the end of the bar the price is less than ma1 ). Of course this is a simplified description of the crossing and does not cover all possible situations, the "real" description is much more complex.

 
goldtrader >> :

The current one will come back.

And it's not even just the native character.

The ability to look deep into history has been cut as much as the developers could.

Tester Grails are harder to build, but still possible.

Thank you. Can you then tell me, in a follow-up, about those moments when you can look deep into the story to avoid them?

 
KING >> :

Thank you. Could you, please, tell us about the cases when the history has to be reviewed to avoid them?

It is unlikely that you will get it by accident.

For example, you can read the history using the standard MQL4 tools and save it in a custom file.

And use it as you see fit.

 

That's the theme ! !

And I have a question: I put a bunch of different indices on the chart with my own parameters, how can I quickly transfer this whole bunch (not to hook each individual variable((())) to another 15 charts? Ж)

 
WroC >> :

That's the theme ! !

And I have a question: I have a bunch of different indices on my chart. How can I quickly transfer this bunch (without adding each individual variable(()) to another 15 charts? Ж)

Create a template, save it and load (use) it as required.