Ребята, спасибо за сочувствие.
Алгоритм работы DLL такой:
If AA > BB Then
Begin
Buy 2 Lots This Bar at Close ;
triger == 2 ;
End;
If Marketposition == 1 And triger == 2 Then
Begin
Sell 1 Lots Next Bar at (Entryprice + 50 point) Limit;
triger == 1 ;
StopLos == (Entryprice - 50 point);
ProfitLevel == (Entryprice + 100 point);
End;
If Marketposition == 1 And triger == 1 Then
Begin
Close All Next Bar at StopLos stop;
Close All Next Bar at ProfitLevel stop;
triger == 0 ;
End ;
// Marketposition == 1 - открыт ордер BUY .
// Marketposition == -1 - открыт ордер Sell .
// Entryprice == Close открытого ордера .
DLL брал здесь:
FX1 | SharedVar - Key-Value Storage for Traders and Quants