[Archive!] Any rookie question, so as not to clutter up the forum. Professionals, don't pass it by. Couldn't go anywhere without you - 2. - page 133

 
sto_mat:


dac I put in

Everything is correct, only there is no control that an order has already been placed, i.e. you will now place a new order every tick
 

do you think that when averaging the number of positive changes (similarly, the number of negative changes)

Do you think it is necessary to take into account the bars with zero amount of changes?

 
eddy:

do you think that when averaging the number of positive changes (similarly, the number of negative changes)

Do you think it is necessary to take into account the bars with zero changes?


The question is not quite clear. Is it MovinAverage? If it is a moving average, what do negative and positive changes have to do with it? And, by the way, it is not at all clear what changes we are talking about. What is changed? Or what changes are accounted for?
 

the average is the arithmetic mean. it's about price changes.

if there are positive changes, for example, one each on six bars, but 0 on 2 bars,

you can obtain the average of 8 bars by dividing 6 by 8, or you can ignore 2 bars and divide 6 by 6

 
eddy:

the average is the arithmetic mean. it's about price changes.

if the positive changes, for example, are one each on six bars, but 0 on 2 bars,

you can obtain the average of 8 bars by dividing 6 by 8, or you can ignore 2 bars and divide 6 by 6


This is not a question for the programmers. It is a question for a mathematics textbook. There is a formula for calculating the arithmetic mean, by which it equals the sum of all the elements in a number series divided by their number. You have the formula. So decide for yourself what exactly you need - the formula will tell you everything :)
 
so there is no element on one side (no change on the bar)
 
eddy:
so on the one hand the element is missing (no change on the bar)
It is more likely to be zero than absent...
 
zero - absence) why consider absence
 
eddy:
zero - absence) why take absence into account

In the first month you earned 5000 on the foreign exchange market, in the second month you earned 3000, in the third month you earned 7500, in the fourth month you lost 6000, in the fifth and sixth months the market did not bring you a single quid, only a headache.

Question: How much have you earned on average on the currency market in half a year?

 

I know how the arithmetic mean is calculated.

If I had not worked for the last two months I would not have counted them, similarly there is no change in the bars

Reason: