Experts: Nevalyashka

 

Nevalyashka:

We open a new position opposite to the previous one. Inputs only contain Stop loss, Take Profit and the minimum lot.

Nevalyashka, test EURUSD, H1

Author: Vladimir Karputov

 

I'd like to add a martin to the mix.....

 
Vasily Bykov:

I'd like to add a martin to that...

Yes, with a coefficient in the input parameters.

 
Vasily Bykov:

I would add Martin here....


Vitaly Muzichenko:

Yes, with a coefficient in the input parameters.


Which one?

 
Vladimir Karputov:


Which one?

Increase at a loss by a factor N

 
Vitaly Muzichenko:

Increase at loss by N coefficient


Water again :). When you formalise exactly what you want - then I will think about changes.

 
Vladimir Karputov:

Water again :). When you formalise exactly what you want - then I'll think about changes.

I see

 
Vladimir Karputov #:

Water again :). When you formalise exactly what you want - then I will think about changes.

I join the requests to add a martingale to the Expert Advisor, so that in the parameters you can specify the multiplication of the lot by coefficient X when a stop loss is triggered. Those who do not want to use martin will set coefficient 1.
.

That is, the strategy is simple, the initial lot is set (which should be specified in the parameters), when a stop loss is triggered, the EA multiplies the next position by the set coefficient X, and so on until the take profit is triggered. After the order closes on take profit, the EA places an order with the initial lot. This is the first request to improve the EA.

And the second request, for some reason it is impossible to set stop loss and take profit as you want, now there is a restriction on setting more than 65000 stop or profit. I tried to trade on indices and there quotes like 200,0001, take and stop there should be such a long 10000 (it is 100 points) or 1000000 (10 thousand points).Can you make it possible to set take profit and stop loss as I want without restrictions?

Thank you! :-)

 
Znatok2604 #:

And the second request, for some reason it is impossible to set stop loss and take profit whatever you want, now there is a restriction on setting more than 65000 stop or profit. I tried to trade on indices and there quotes like 200,0001, take and stop there should be such a long 10000 (it is 100 points) or 1000000 (10 thousand points).Can you make it possible to set take profit and stop loss whatever I want without restrictions?

Good evening!

Change two lines in the code of the Expert Advisor:

input ushort   InpStopLoss          = 50;       // Stop Loss (in pips)
input ushort   InpTakeProfit        = 50;       // Take Profit (in pips)

to:

input ulong   InpStopLoss          = 50;       // Stop Loss (in pips)
input ulong   InpTakeProfit        = 50;       // Take Profit (in pips)

and then you can set stop loss and take profit from 0 to 18 446 744 073 709 551 615.

Regards, Vladimir.

 
MrBrooklin #:

Good evening!

Change two lines in the EA code:

to:

and then you can set stop loss and take profit from 0 to 18 446,744,073,709,551,615.

Regards, Vladimir.

I changed it and everything worked! Now I can set stop loss and take profit any way I want.Thank you very much! :-)