Any questions from newcomers on MQL4 and MQL5, help and discussion on algorithms and codes - page 823
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
It is possible to read an order ticket.
Is there a similar function
OrderGetTicket();
for mql4?
Is there a similar function
for mql4?
There is, only not exactly the same. After selecting an order you have to define the order type and the ticket by other functions.
Good afternoon.
There is a function to open a grid of orders with lot incremented by i,
I need the grid (lots) to be built by lot, i.e. lot1 = 0.01, lot2 = 0.02, lot3 = lot2 + lot 1. ,
how should this be described in the fLots() function?
I want to check if there are any open positions in onInit, but for some reason I can't select them:
I get:
2019.05.01 00:11:32.177 breakeven (GBPUSD,H1) ticket(1) = 0
2019.05.01 00:11:32.177 breakeven (GBPUSD,H1) false
2019.05.01 00:11:32.177 breakeven (GBPUSD,H1) Position Total = 1
I want to check if there are any open positions in onInit, but for some reason I can't select them:
I get:
2019.05.01 00:11:32.177 breakeven (GBPUSD,H1) ticket(1) = 0
2019.05.01 00:11:32.177 breakeven (GBPUSD,H1) false
2019.05.01 00:11:32.177 breakeven (GBPUSD,H1) Position Total = 1
Right away it catches my eye:
I didn't look further because it should be like this in a reverse cycle:
Immediately that caught my eye:
I didn't look any further, because that's how it should be on the reverse cycle:
I prefer this notation
I prefer this entry
Well... I showed an understandable one for beginners ;)
Hello. Please help me calculate the profit of closed trades yesterday, the day before yesterday, etc. I want to do Profit for today:. Profit for yesterday, profit for the day before yesterday
I copied the code/ for today's profit calculation.
or how to set profit today to postpone this value to yesterday's profit and then to the profit the day before thatHello. Please help me calculate the profit of closed trades yesterday, the day before yesterday, etc. I want to do Profit for today:. Profit for yesterday, profit for the day before yesterday
To calculate today's profit, copy code/.
or how to make value from today's profit move lower to yesterday's profit, then to the day before yesterday's profitAdd one more parameter to the function description and change the check condition: