I write indicators, EAs, not for free anymore :) - page 7

 
StatBars >> :
The code not only increases the lot but also decreases it, it all depends on the depo, the depo goes up - the lot goes up... I thought you needed this...

There's a lot of regulation of the lot depending on the size of the depo, but I haven't found a solution to my problem. But thanks all the same for your feedback.

 
rusmos писал(а) >>

OK. The first lot is Buy with lot 0.1. In response, the SellStop is immediately set at 20 pips from below with 0.2 lot (i.e. increase by 0.1)

Further, if the Sell has triggered, in the answer we set the ByStop with 0.3 lot (i.e. increase the LAST lot again by 0.1) and in principle so-and-so.

It is important that the magnitude of the increase in lot should be adjusted at your discretion.

Well, respectively, two interesting options. Addition and multiplication.

Uf, I think so)

Option of multiplication is 100% written! Just not in the way you set the problem... If the previous deal has closed in "-", it means that the lot of the next deal will be multiplied,

If the previous deal closed in "+", then you open a position with the initial lot...

 
StatBars >> :

The multiplication variant was 100% written! It's just not the way you set the task... If the previous trade closed in "-", it means the lot of the next one will be multiplied,

If the previous deal closed in "+", then we open a position with the initial lot...

The option of multiplication is interesting, but it is mainly addition.)

But the previous lots remain open.

Thank you and only you answer.

I guess it's about the holiday :)

 
Inspire >> :

I'll write a couple of indicators/advisors for free as a warm-up and feedback.


And then we'll see :)

Where is the initiator of the thread?

 
Integer >> :

Formulate the question properly. First order, subsequent orders. The first from what? From the beginning of the Unic age, or from the day of Christ's coming, or the creation of the world, or maybe from the moment you had breakfast and took a walk? Whatever the question, whatever the answer.

OK. The first lot is Buy with lot 0.1. The reply is a SellStop of 20 pips from below with 0.2 lot (i.e., increase by 0.1)

Further, if the Sell has triggered, in the answer we set the ByStop with 0.3 lot (i.e. increase the LAST lot again by 0.1) and in principle so-and-so.

It is important that the magnitude of the increase in lot should be adjusted at your discretion.

Well, respectively, two interesting options. Addition and multiplication.

>> Ugh, I think that's it.)

 
sol >> :

It would be nice to formalise the task not just approximately, but concretely, so that someone could take it on.

OK. The first lot is Buy with lot 0.1. In response, the SellStop is immediately set at 20 points from the bottom with 0.2 lot (i.e. increase by 0.1)

Further, if the Sell has triggered, in the answer we set the Bystop with 0.3 lot (i.e., increase the LAST lot again by 0.1) and in principle so-and-so.

It is important that the magnitude of the increase in lot should be adjusted at your discretion.

Well, respectively, two interesting options. Addition and multiplication.

>> Ugh, I think that's it.)

 
Svetilnik писал(а) >>

Good evening again :)

With a new request. I realized that I won't be able to figure it out on my own anyway.

I am asking to write an EA based on the WATR indicator (EA code below). When the indicator makes a turn, it closes the open order (if it has not been closed by SL or TP) and opens a new order in the direction shown by the indicator. We open only one order exactly at the reversal point. Then we wait for the next reversal of the EA.

Input parameters: lot size, SL, TP, slippage. I do not seem to have forgotten anything :)

Regards, Svetlana. ICQ 320355718

The code of the indicator:

That seems to be what you wrote...

Isn't there such an EA in CodeBase?

Files:
e_a_watr.mq4  3 kb
 
StatBars >> :

That seems to be what you wrote...

Isn't there such an advisor in CodeBase?

I'm not a pro, but I don't understand which part of the code modifies the lot (vol)

 
StatBars >> :

That seems to be what you wrote...

Isn't there such an advisor in CodeBase?

I've looked, probably not all or not attentively :) >>Thank you, I'm off to test it :)

 
rusmos писал(а) >>

Interesting option for multiplication as well, but mostly addition).

But here the previous lots remain open.

Thank you and you're the only ones responding.

I guess it's the holiday ))

here