[ARCHIVE] Any rookie question, so as not to clutter up the forum. Professionals, don't pass by. Nowhere without you - 3. - page 242
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
I will continue with my above question.
I have also used the above code in another EA. The situation with that EA was similar to that described above with the difference that the code conditions were fulfilled exactly the other way around (in the demo, again, everything was working without errors). But one day the tester worked correctly and the code was working properly according to the conditions given to it.
It's a real mysticism.
Also, I sometimes cannot optimize my code for some reason. Sometimes it recalculates something but resets all results to zero for some reason. It happens so on terminals of different brokers. However, when all the stars and constellations in the sky probably converge, everything starts working as it should.
All that remains is to remember the time and day of the week.
All that remains is to remember the time and day of the week.
could you tell me if there is any way to request a profit value for a certain order?
there are 2 user modifications Mod_1 and Mod_2
in both cases the modification condition:
double TS;
int Min_Dist=MarketInfo(Symb,MODE_STOPLEVEL);
if (TS < Min_Dist)
TS=Min_Dist;
How do I change it so the modification doesn't go through with a stop loss condition, for buy stop loss is less than trailing stop,
and for sell, stop loss is larger than trailing stop
https://book.mql4.com/ru/trading/ordermodify
could you tell me if there is any way to request a profit value for a certain order?
https://docs.mql4.com/ru/trading/OrderProfit
Returns the net profit value (excluding swaps and commissions) for the selected order. For open positions, this is the current unrealized profit. For closed orders, it is the fixed profit.
The order must be pre-selected using the OrderSelect() function.
Example:
if(OrderSelect(10, SELECT_BY_POS)==true)
Print("Profit for the order 10 ",OrderProfit());
https://docs.mql4.com/ru/trading/OrderProfit
Returns the net profit value (excluding swaps and commissions) for the selected order. For open positions, it is the current unrealized profit. For closed orders, it is the fixed profit.
The order must be pre-selected using the OrderSelect() function.
Example:
if(OrderSelect(10, SELECT_BY_POS)==true)
Print("Profit for the order 10 ",OrderProfit());
Make unique names and remember them. I don't know your task, maybe you don't need to.
make a Win32 dll project