[ARCHIVE] Any rookie question, so as not to clutter up the forum. Professionals, don't pass by. Nowhere without you - 3. - page 488

 

edit | delete

In the next 24 hours, will there be an upward spurt and to what mark, in your opinion?

 
Amenti:

edit | delete

In the next 24 hours, will there be an upward spurt and to what mark do you think?

You're probably better off with such a question in another thread. Most of the discussion here is about programming, not trading.

However, maybe someone will answer...

 

I hope so...

 

Can you tell me what's wrong, I'm trying to check the condition in the tester, it doesn't show up in the message log, no errors. Perhaps there is a more correct way to write this condition.

int c,b,f;

double x;

int start()

{

if(f==0){double x=Ask;Usl_1();}

if(c==31){Alert("The c-value has reached the maximum");}

if(b==-31){Alert("The b-value has reached the maximum");}

}

void Usl_1()

{

if(x>=x+80*Point){Usl_2();Usl_3();f=1;}

}

void Usl_2()

{

if(x>=x+200*Point && f==1){c++;f=0;Print("Value",c);}

}

void Usl_3()

{

if(x<=x+20*Point && f==1){b--; f=0;Print("Value",b);}

}

THANK YOU ALL!

 
Thank you!!!
 
Vinin:

I've seen different ways, but this one. Use SetIndexShift - upside down.


Happy past all, a question - how would you advise to do it? To do it properly... Because my code is very crooked, but it works...:) phew phew phew. :)

And the main questions - I want to increase lot size with gradual increase of deposit. If there is no possibility to write a piece of code, then please advise how to specify the initial deposit (as I understand a variable), using which function?

Not this function - AccountBalance( )?

 
DOCTORS:


...And the main questions - I want to increase lot size with gradual increase of deposit. If there is no possibility to write a piece of code, then advise how to specify the initial deposit (as I understand a variable), using which function?

Not this function - AccountBalance( )?


The tutorial is here, if that's what you're talking about.
 
Roman.:

The tutorial is here, if that's what you mean.


Probably my brain functions have partially frozen after the holidays, which means that I'm not very good at expressing my own thoughts :(

The point is a little different:

1. As soon as the Expert Advisor starts, I assign the initial value of the deposit to some variable (I am looking for function of assignment, although I can of course prescribe it manually in the initial settings, but I have already been reproached here for my poor programming capabilities, and I want it to be like a white person's).

2. Since my system is cunning, and works only one lot, the initial value of the lot (say) 1.0 ...

3. And the main question - I want after each profitable trade, the deposit was compared to the original, and if the new value (say) was more than 30%, I change the lot size value by 0.1, ie 1.0 +0.1, and so on constantly (clearly the nuance that constantly has to change the old value of the variable, and again the assignment operator of the variable value of the deposit).

Anyway, it goes like this.

 

Is the file descriptor always greater than zero on successful opening?

Please see if the logic in this code, which opens the file for writing, is correct

  int Handle = FileOpen("tratata.csv",FILE_CSV|FILE_READ|
FILE_WRITE,";");
  if(Handle < 0)
    {
    FileOpen("tratata.csv",FILE_CSV|FILE_WRITE,";");
    }
  if(Handle >0)
  FileClose(Handle);
Reason: