[ARCHIVE]Any rookie question, so as not to clutter up the forum. Professionals, don't pass it by. Can't go anywhere without you - 5. - page 18

 

I SHOULD GO OUT THEN I'LL THINK ABOUT IT AND I'LL WRITE

I CAN BE IN RED, THE BALANCE IS GROWING AND THE EQUTI VALUE RISES ABOVE 1050 AS IN THE EXAMPLE BUT THE EA DOES NOT CLOSE BECAUSE THE PROFIT IS STILL IN RED!

 
Dimka-novitsek:
Good evening! Tell me if I understand correctly that in
iStochastic
mode
Is it the K or D line I'm referring to? Moreover, 0 is K and 1 is D?
No mode, these are the MODE_MAIN (0) and MODE_ SIGNAL (1) lines
 
Thank you! How do you get the dae and ca?
 
yastrebmd:

I SHOULD GO OUT THEN I'LL THINK ABOUT IT AND I'LL WRITE

I CAN BE IN RED, THE BALANCE GOES UP AND THE EQ VALUE RISES ABOVE 1050 AS IN THE EXAMPLE BUT THE EA DOES NOT CLOSE BECAUSE THE PROFIT IS STILL IN RED!


The balance does not increase until at least one order is closed. Only equity can grow as the balance does not consider unrealized profit.
 
Hello! Help me write a simple Expert Advisor
On the chart I set the line, on any timeframe for convenience
If price is down after the close of the candle below the line open order SELL
If price goes up BUY (other order if opposite was closed) and so on until the price moves away and reaches the profit, which is set manually in the EA settings. slippage = 0, TP=0, Lot=0 in settings
I would like the orders to be marked with arrows but they are not obligatory.
I would like to have arrows to mark them, but it is not obligatory. Thanks in advance for the help.
 
yastrebmd:
Hello all, I need to remake the EA to close all positions after a certain percentage of the initial amount of the requisite, for example if I have not opened a single order, the requisite of 1000 and % of the requisite is set to 5%, I have made the EA recorded a global variable and that it is this value to count and close positions but the EA does not want to close,I have done it so, the balance increases and I have to close some positions at 5% of Equity. Eventually I get more than 1050 and sometimes I have to wait some more, or the price changes its direction and I get a loss instead of profit, please help who knows and has faced global changes!!! Thanks a lot for the reply.

I have the following situation

double Pr = NormalizeDouble(AccountProfit()*100/AccountBalance(),2);
 
Dimka-novitsek:
Thank you! How do you get the dee and ca?

They are set, and get the optimum, in the batter.

 

Okay. And here's what I was asking

      double Stochastic_D = iStochastic( NULL, ??????);
      double Stochastic_K = iStochastic( NULL, ??????);
      
 
Dimka-novitsek:

Okay. And here's what I was asking

No, that's not it. Read carefully Then the questions.
 
Yeah, I got that right, and you just confused me.
Reason: