Check - what have I done wrong? - page 3

 

only theorists in the topic :)

Profit for BO is saved in the Balance operation and the order in the comment to that operation.
add to the defines

#define  OP_BALANCE 6

and go through the history by this type, collecting profit/loss.
And accordingly the last OP_BALANCE operation is the last order.

 
Taras Slobodyanik #:

only theorists in the topic :)

Profit for BO is saved in the Balance operation and the order in the comment to that operation.
add to the defines

and go through the history by this type, collecting profit/loss.
And accordingly, the last OP_BALANCE operation is the last order.

Programming for algotrading without using it in practice is theory or post factum disappointment?
Let's just say - hands down on the keyboard, nowhere to go....
;)
 
Nikolai Semko #:

Yes, Natalia - that was just a "When they pay you for a line of code" meme.

That's the kind of humor programmers have.


You don't need a function in your case.

You just need to form the variables Volume1 ... Volume10 first form an array Volume[10]
and then use index n to refer to its items volume[n].
Do not worry - almost every programmer has gone through this.
The main thing is that you really like programming. I can feel it.
Then you'll go far.

The picture made me laugh 🤣🤣🤣🤣🤣 thank you. It was a great night!
Well, I figured it out.
I pieced it all together 500 times, rewrote it all and got it done.

Thank you and everyone who took part in the discussion!
 
Taras Slobodyanik #:

only theorists in the topic :)

Profit for BO is saved in the Balance operation and the order in the comment to that operation.
add to the defines

and go through the history by this type, collecting profit/loss.
And accordingly the last OP_BALANCE operation is the last order.

It's just that BO has a bit of its own ethos I guess.
Thank you for the new knowledge!

Probably a silly question, but I'll ask it for myself and you might be amused - what does the number 6 after the word
OP_BALANCE
 
Natalya Smirnova #:
Yes, it's just that BO has a slightly different spin on it, I guess.
Thank you for the new knowledge!

It's probably a silly question, but I'll ask it for myself, and you may be amused by it - what does the number 6 after the word

Good evening and good mood everyone!

Here you will find a detailed answer to your question about the number 6.

Regards, Vladimir.

 
Natalya Smirnova #:
It's just that forex trading has its own specifics, I guess.
Thank you for the new knowledge!

It may be stupid, but I will ask myself, and it may make you smile - what does the number 6 after the word
It's to make the lines shorter for novelty hunters.
There's no need for MT4, it's readable as it is.
 
Natalya Smirnova #:
This will probably be a silly question, but I will ask it for myself and it might make you smile - what does the number 6 after the word


Constant

Value

Description

OP_BUY

0

Buy

OP_SELL

1

Sell

OP_BUYLIMIT

2

BUY LIMIT pending order

OP_SELLLIMIT

3

Pending SELL LIMIT order

OP_BUYSTOP

4

Pending BUY STOP order

OP_SELLSTOP

5

Pending SELL STOP order


OP_BALANCE 6 deposit/withdrawal

OP_CREDIT 7 credit funds


i.e. when going through your order history 6 = deposit (or withdrawal)
and you can find your order number in the comments

 
Taras Slobodyanik #:


Constant

Value

Description

OP_BUY

0

Buy

OP_SELL

1

Sell

OP_BUYLIMIT

2

BUY LIMIT pending order

OP_SELLLIMIT

3

Pending SELL LIMIT order

OP_BUYSTOP

4

Pending BUY STOP order

OP_SELLSTOP

5

Pending SELL STOP order


OP_BALANCE 6 deposit/withdrawal

OP_CREDIT 7 credit

What is the define for?
If equal to 6 and that's it.
 
Renat Akhtyamov #:
What's the define for?
If it equals 6, that's it.

Because six months later you won't remember what 6 means in your code.
If you practiced programming you would understand it.

 
Taras Slobodyanik #:

That in six months you won't remember what 6 means in your code.
If you had practiced programming, you would understand it.

That's what I'm talking about. See my listing on the previous page, braggart ;)
Programs should be written in such a way that they do not need comments and other perversions.