Any questions from newcomers on MQL4 and MQL5, help and discussion on algorithms and codes - page 1575

 
Eugen8519:
Yes only

TrailingBuy/Sel Step and Trailing Stop Shift at 0.6

a -- Funktion ein/ausschalten -- to "false "

Stoploss / Takeprofit do not change?
 
MakarFX:
Stoploss / Takeprofit do not change?

EA was set up for futures,

i think it's not that important, let it run for a month and sooner or later you will come across a case where it pulls up trailing

 
Eugen8519:

EA was set up for futures,

i think it's not that important, let it go for a month and sooner or later you will come across a case where it pulls up trailing

I need to know under what conditions you open more than two orders
 
Just went from 16.07.21 to 19.07.21 and only one transaction...
 

maybe you need to take a lower take profit and stop loss

for example take profit is 500 and stop loss 150, trailing step is 0.6


we open a long position -> we have reached 150 pips -> we automatically buy an additional contract -> the stop loss is increased by 70 pips.
 
Eugen8519:
For example, take profit is at 500, stop loss is at 150, trailing step is at 0.6

We open a long position -> we have reached 150 pips -> we automatically buy an additional contract -> the stop loss is increased by 70 pips.

You have a problem that needs to be solved! Why should I sit in the tester and wait until "sooner or later you'll come across such a case"?

Try this one.

Henceforth, if you can't provide a full picture of the situation, you shouldn't apply.

Files:
EA.mq5  36 kb
 
I didn't say you had to wait half a day in the tester, look at the second day, but it's up to seven contracts
Files:
x3.PNG  54 kb
 

Good evening.

Please show me what should be written in the EA to set the stop loss and profit on the basis of, say, H4 candlestick statistics for the last year.

 
darirunu1:

Good evening.

Can you please show me what should be written in the EA to set stoploss and take profit on the basis of, say, H4 candlesticks statistics for the last year?

It depends on how you are going to calculate stop and take profit on the basis of statistics ... I'm not sure what "candlestick statistics" means, how do you calculate them?

 
MakarFX:

You have a problem to solve! Why should I sit in a tester and wait until "sooner or later you'll come across one."

Try this option.

From now on, if you can't give a full picture of the situation, you shouldn't ask.

I have made this option, thank you for your support and for your help.

Reason: