Any questions from newcomers on MQL4 and MQL5, help and discussion on algorithms and codes - page 198
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
Are you sure you looked at the last code you posted? If so, I need a rest... thank you.
Trace the"c" variable.
Yes, thank you! I see - but can't quite make sense of this code yet - will be experimenting!
Victor Nikolaev- thanks for your help!
Good day all!
Please tell me if you can change the value of MAJIC NUMBER in an order which has already been closed and appears in the list of closed orders.
I.e., change the value of MAJIC NUMBER after the order is closed.
If it is possible, then which function should be used to change it. I did not find such a function in Kim's work.
Thank you.Good day all!
Please tell me if you can change the value of MAJIC NUMBER in an order which has already been closed and appears in the list of closed orders.
I.e., change the value of MAJIC NUMBER after the order is closed.
If it is possible, then which function should be used to change it. I did not find such a function in Kim's work.
Thank you.You cannot. And why do you need it at all - maybe there is another solution to the problem?
You can't. Why would you want to do that in the first place - is there another solution to the problem?
Thanks for the tip.
While I was waiting for an answer, something came to mind. If it doesn't work, I'll write down what I need.
Can you give me a hint?
if(OrderSelect (Ht-1,SELECT_BY_POS, MODE_HISTORY)) // if LAST order
if ( OrderType ()==OP_SELL)// SEL
X = OrderProfit( );// store the TakeProfit value
if (OrderSelect (Ht-1,SELECT_BY_POS, MODE_HISTORY)) // if LAST order
if ( OrderType ()==OP_SELL)// SEL
if(X < 0)// and if this Sell was closed at the stop
OPEN ANOTHER ORDER
QUESTION
How to code an addendum to these conditions.
Not only the last order, but also the next-to-last and last-to-last orders should be closed at stop
and only then
TO OPEN ONE MORE ORDER.
Thank you.
I've had a look at it. Corrected it. In the tester for 3 months this is the result
The drawdown is big.
If at 4am - not many bars yet for today. On H4 there are only 6 bars in a day. you need to set the number of bars to search for or the number of crossovers.
distances large = trend
Can you give me a hint?
if(OrderSelect (Ht-1,SELECT_BY_POS, MODE_HISTORY)) // if LAST order
if ( OrderType ()==OP_SELL)// SEL
X = OrderProfit( );// store the TakeProfit value
if (OrderSelect (Ht-1,SELECT_BY_POS, MODE_HISTORY)) // if LAST order
if ( OrderType ()==OP_SELL)// SEL
if(X < 0)// and if this Sell was closed at the stop
OPEN ANOTHER ORDER
QUESTION
How to code an addendum to these conditions.
Not only the last order, but also the next-to-last and last-to-last orders should be closed at stop
and only then
TO OPEN ONE MORE ORDER.
Thank you.I need some kind of indicator to change the indicator, I want to draw a line from high to low on the hour chart every 24 hours, and get the data on the length of the line and the slope and be able to work with these data in the code, I'm not a great expert on mql4 if I write from scratch, big problem?
I've got a two-coordinate stretched line, no matter how I turned it around it's just a mess, please help me, maybe I should not have messed with it.