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

 
PapaYozh:

Like, yes. It worked the second time.
You're a shaitan!!!!!!!!!!!!! Thank you very much !!!!!!!!!!!
 

I've never understood why People are too lazy to think... :((

Because you see, no matter how many orders are open and what orders these are, when the price changes by one pip, the total profit on orders changes by a discrete step (except for floating spread, then this step is floating) !!!!!!!!!!!!!!!!. When the step*pip is > your current loss, then your profit will come to you !!!!!!!!!!!!

 
A question has arisen: Why is the int type always assigned to the special start function?
 
Geowind64:
A question has arisen: Why is the int type always assigned to the special start function?
This is how the code generator is set up. You can return any type, but in system call special functions do not return anything regardless of type.
 
MaxZ:

Awesome!!! :)) :))


With a fixed lot there is a linear growth. The Expert Advisor catches strong "tick" impulses (which can develop during a minute or two or three as they happen) and tries to follow them.

The main idea: to get, for example, 10 losses in a row (not more than 5-10 pips in size), 10 Breakeven losses and at least one profitable trade (with TP = 150 pips). Everything is perfect in the tester. Losses and breakeven are much less than in the described model.

But there are a lot of inconsistencies in real trading. It's all about generation of ticks by the tester... In the tester, it's much easier to enter and breakeven. We should limit the tester. As a result, we've got another tester's grail (but it works only on five signs!)... Yes, I refused four signs for this model too, as a matter of principle! ;)

I was watching the tester with such happy eyes, and then I started to use a demo account and was disappointed. I keep digging in that direction though... May be it is not worth it? Maybe this is just an illusion? :DDD

But it was one of the participants of the contest on the demo accounts that gave me the idea. He has won the contest more than once. The principle is the same, but how does it detect entries (may be it is multicurrency, but it is not a fact, may be there are several currency pairs and EA is hovering on each one) and how does it understand that the entry is false and closes the position so early without letting it go in long minus (literally half a minute, a minute or two passes)? Or the deal is already at breakeven and wait for profit or b/o... The history of his trades is open and freely available on the website of the Broker conducting the contest.


Send me an owl in your inbox... I've got a similar one I'd like to demo... I'll send you mine...
 
 int j=-1;
 for ( i=0; i<OrdersHistoryTotal(); i++) {
      if (OrderSelect(i, SELECT_BY_POS, MODE_HISTORY)) {
         if (OrderSymbol()!=Symbol())     continue;
         
         if (OrderMagicNumber()==1000 || OrderMagicNumber()==2000) {
            if (wremjapomnim<OrderCloseTime()) {
                wremjapomnim=OrderCloseTime();
                j=i;
               }
            }
         }
      }
    if (OrderSelect(j, SELECT_BY_POS, MODE_HISTORY)) {Alert ("j=",j,"     OrderProfit()=",OrderProfit(),"  OrderClosePrice()",OrderClosePrice());
    
    
                        if (0<OrderProfit()) {
                Profit=OrderProfit()+Profit;Alert("Profit",Profit,"  Позиция с тикетом #",OrderTicket(),"    i  ",   i   );
                Koeffitsient=Koeffitsient+1;
                
               }
            if (0>OrderProfit()) {
                Loss=OrderProfit()+Loss;  Alert("Loss",Loss,"  Позиция с тикетом #",OrderTicket(),"    i  ",   i );
                Koeffitsient=1; 
               }
DAILY! Can you tell me how
OrderProfit( )

?

Its value is something like zero, does that happen? Is it equal to

OrderProfit( ) )
and OrderClosePrice( ) -OrderTakeProfit( ) ?

 

invalid price 0.00014423 for OrderSend function

what is this ?????????

 
Dimka-novitsek:
DAILY! Can you tell me how
OrderProfit( )

?

Its value is something like zero, does that happen? Is it equal to

OrderProfit( ) )
and OrderClosePrice( ) -OrderTakeProfit( ) ?

Before using OrderProfit(), the order itself must be selected through OrderSelect().
 
Dimka-novitsek:

Its value is somehow equal to zero, does that happen? Is it equal to

OrderProfit( )
and OrderClosePrice()-OrderTakeProfit() ???

No.

Because

double OrderProfit( ) 
Возвращает значение чистой прибыли (без учёта свопов и комиссий) для выбранного ордера. Для открытых позиций это - текущая нереализованная прибыль. Для закрытых ордеров - зафиксированная прибыль.
Ордер должен быть предварительно выбран с помощью функции OrderSelect(). 

А

OrderClosePrice()-OrderTakeProfit() - это разность значений двух цен
 

I.e., the difference is only for open orders, because the realised profit is the difference between the two prices including swaps and commissions?

And do I correctly understand that OrderProfit( ) can be negative?

Thank you! I will see if I have a select.

Thanks to all!!!

Reason: