[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 1065

 
EURUSD, 1440
 

Good afternoon, really hoping for your help...

I originally needed a script that would open three orders at the same time. As a result I found JMBuyer v2 & JMSeller v2. But I'm not happy with the fact that it can open one or two positions and score the rest if any error occurs. Since I just started to learn MQL, I decided to experiment.

1. I took a classic example from MQL tutorial (https://book.mql4.com/ru/trading/ordersend) and used it to modify existing JMBuyer v2 & JMSeller v2 files. I wanted the script to open three orders with equal SL but different TP. This modification of the script works. It does open 3 orders with different TP.

2. However, I did not like the first variant and decided to try the same but with a loop (DBuy & DSell). But this variant didn't work. Unfortunately, I'm unable to grasp the reason behind it. I had a look at the logics and everything seemed to be in order.

Dear Sirs, please take a look at.

PS In the attached file are the codes of the two versions of the script. Unfortunately, only one file can be attached to the message

Files:
examples_1.txt  12 kb
 
mqlskeptik:

Please tell me how to declare indicator to which symbol it should be applied, for example:

Print(iMA(NULL, 0, 14, 0, MODE_SMA, PRICE_CLOSE,0));

null is the current symbol

how to write it correctly so it outputs a value on eu-dollar, on diaries, no matter what symbol the EA is attached to.

I thought

Print(iMA(EURUSD, 0, 14, 0, MODE_SMA, PRICE_CLOSE,0));

I wonder if it is possible to do this.

Print(iMA(EURUSD, PERIOD_D1, 14, 0, MODE_SMA, PRICE_CLOSE,0));

It will be more clear

 
artmedia70:

Print(iMA(EURUSD, PERIOD_D1, 14, 0, MODE_SMA, PRICE_CLOSE,0));

It will be more clear


Print(iMA("EURUSD", PERIOD_D1, 14, 0, MODE_SMA, PRICE_CLOSE,0));

This is more accurate.
 

Hello, dear forum members, I hope very much for your help.....

Research Method assignment: collect data, build a theory, create a hypothesis and use Linear Regression to get results, confirm or refute the hypothesis. All work should be done in SPSS software.

Data: Clients of a health resort in different years (2006-2009)

  • Name
  • gender (1.male, 2.female)
  • age (ranging from 1-67 years)
  • diagnosis (4 types)
  • Type of program, which usually depends on the diagnosis(1. wellness program (rehabilitation after a fracture or stroke, chronic illness) 2. health and beauty program(various rejuvenation procedures, massages, spa treatments, etc.), 3. accompanying person (e.g. mother accompanying a child or person who is seriously ill after a stroke, etc.)
  • The source of the information about the spa (1.doctor, 2.travel agency, 3.was sent by the government, 4.found it myself)
  • price of the programme (both total price and the price for each day of stay)
  • length of stay (each client is different)
At first I thought it was possible to determine which type of client brings more profit to the company, i.e. who spends more money? the one who comes for the health programme, for the "beauty and health" programme or generally who comes as a companion . The dependent variable is the price the client pays for one day of stay, and the independent variables are the types of these programmes(health, beauty and wellness or companion (because the companion also spends money for accommodation, food, etc.)). Using coefficients (R-squared coefficient of determination, correlation, significance of a variable) to understand how a particular independent variable affects the company's profits. The result could have helped the company determine its future development strategy - which customers to focus on more.

But as a result, I came to the conclusion that it was too obvious that it could all be calculated in Excel by applying a filter with each type of programme separately, and simply adding up the profits.

Then I thought that since I had data for the previous 3 years, I could use regression analysis to predict what the profits would be in 2010 and from whom exactly. The dependent variable would again be the price per stay day, which changes over time. Then you can "play around" with the data and see how it will affect the forecast. For example, how will grandmothers or grandfathers, those who learned about the resort from the doctor or from the travel agency, etc. affect the forecast. I understand where I take the dependent variable when doing this analysis in SPSS, but I don't understand what to take as the independent variable, time? how?

So my question is, what do you think, dear experts in the field, am I thinking in the right direction, and if not, please advise me, what can be done with this data, how and where to apply linear regression? what hypothesis can I create and then confirm or refute? I am far from an expert in this field myself, I have never encountered statistics before, much less the exploratory method(((.

Thanks in advance!

Sincerely,

Milena.

 

I want to try portfolio of bots on one account (I want them to trade on demo account for a week), but terminal is hopelessly hangs. What should I do? I tried to experiment, I have installed 6 terminals and in each terminal I have entered one account number and password. When I open deals in any terminal, they are opened and I can view them in any terminal. And separately 8 terminals with one EA on each work more or less normally.

 
marker:

I want to try portfolio of bots on one account (I want them to trade on demo account for a week), but terminal is hopelessly hangs. What should I do? I tried to experiment, I have installed 6 terminals and in each terminal I have entered one account number and password. When I open deals in any terminal, they are opened and I can view them in any terminal. And separately 8 terminals with one EA on each work more or less normally.

This is a problem, not like the comment before))

If you have a problem with that, then the EA will not work normally, because you can't see it in the chart.

If all ticks are used, then slips, through global variables of the terminal, with frequencies of for example 5 seconds. (8*5=40 sec) at the beginning of the start.

Well, or identify the required calculation time for each EA by the arrival of a tick.

It will not be quite exact (anything can happen in 40 sec.), but the general picture will become clearer!

 
costy_:

This is a problem, not like the comment before))

If not all ticks are used (which is unlikely because we are hovering), then limit EA access to the trading thread by bar opening time.

If all ticks are used, then slips, through global variables of the terminal, with frequencies of for example 5 seconds. (8*5=40 sec) at the beginning of start.

It will not be exact (anything can happen in 40 sec.), but the general picture will become clearer!


No, the squeeze as you put it won't work (because I'm for accuracy):))), and advisors, there are also by bar opening, there are all ticks. I'm just not a coder, I think I have to install 8 terminals (with one account), but here I have another question how to use a script that parses trades by magics.... at the same time:))
 
marker:

No, the squeeze as you put it won't work (because I'm for accuracy):))), and advisors, there are also by bar opening, there are all ticks. I'm just not a coder, I think I may have to install 8 terminals (with one account), but here I have another question how to use a script on 8 terminals simultaneously which analyses deals by magics....)
8 terminals = 8 scripts)) and you don't have to parse.
 
costy_:
8 terminals = 8 scripts )) and you do not have to disassemble them.

In principle, this is probably what will happen. One account, 8 terms, 8 scripts each will save their trades in a separate folder (sorted by magic). Why do I want one account, because I want to look at the curve of the whole portfolio....something like this....s are now hanging separately. Thanks for the reply:)) Although, it would be more convenient if all deals were stored in one file, but sorted.