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

 
FAQ:
I often use the init() function from "start" under certain circumstances (if you need to re-purpose it).


The handbook and tutorial point out the necessity of connecting to a server (for the EA, scripts, indicators).

Is it possible to call special functions without connecting to the server (in principle)?

 
PerlOF:


Is it possible to call special functions without connecting to a server (in principle)?

Yes.

 

The last trade in the Tester was a Sell-Stop:



At the time of opening the trade there was ~9000$, and the risk was calculated for 2% of the deposit.
- How did the loss on the trade turn out to be -$1089 ?


 
atztek:

The last trade in the Tester was a Sell-Stop:



At the time of opening the trade there was ~9000$, and the risk was calculated for 2% of the deposit.
- How did the loss on the trade turn out to be -$1089 ?



Something is wrong with your dates
 
Vinin:

You've got something wrong with the dates.
It's not me :)
I saw that when closing a position the Tester indicates 2010.02.02, although testing started 2011.01.01.
Historical data are perfect, there are no errors (chart mismatch error = 0).

A position was opened on 2012.03.28, but it was closed not on the real SL, but due to the fact that this is the end of
history in the Tester and the trade is closed by force. Apparently Tester simulated a close on SL and something is wrong with that.


Again - the problem is only with this last transaction, all the others have been calculated absolutely correctly.

 

Hello, I have the following code, check for the presence of orders and if I have an open order, then check again and again until the order reaches 0. But the EA clearly ignores this code and opens an infinite number of orders, please advise what the error is?

int FunctionBUYnext()
{
int b=OrdersTotal();
if (b>0)
{FunctionBUYnext();}
else {FunctionSELL();}
}

 
Roll:

Where exactly?


Yes, indeed the script works...

i.e. before the first Start()

BUT INIT() is missing in the SCRIPTs

---------------------------------------------------

(FROM THE TEXTBOOK)

In the scripts a special function init() is called (and executed) right after a symbol is attached to a chart.

---------------------------------------------------

So, the program operation is possible but connection to the server is necessary IMMEDIATELY for special functions?

 
PerlOF:


Yes, indeed the script works...

i.e. before the first Start()

BUT INIT() is missing in the SCRIPTs

---------------------------------------------------

(FROM STUDY BOOK)

In scripts a special function init() is called (and executed ) right after attaching a symbol to a chart.

---------------------------------------------------

So, the program operation is possible but connection to the server is necessary IMMEDIATELY for special functions?

Yes, of course" INIT() in SCRIPTs is absent ..., but it is called (and executed) "... (your statement).

Your question is answered by me above.

 

how do I see if a previous trade was loss-making or not? formulate the condition specifically with an if.

 
Roll:

Yes, of course," INIT() in SCRIPTs is missing ... but is called (and executed) "... (your statement).

Your question is answered by me above.


understandably, it's a dummie's question...

How to learn the THEORY. So, I guess it's from programming area: CLIENT-SERVER.

Is it somewhere to dig into C++ ).....?

Reason: