[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 589
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
:)))) there is no such condition as NOT to modify! :)))
QUESTION: under what conditions would you and I not be having a chick-chick-chick conversation right now! :)))
Can you suggest some literature to get me started and create my own EA! Or is it something that mere mortals cannot do? )))
1) it is understandable
2) just checked...in Alpari you can't set stop and take on opening. only through subsequent modification...costs of non-dealing-desk
3) there is a strategy.
Then it's as simple as you suggested. After modification, you set a checkbox and check its status before modification.This is if there is one order. If there is more than one, you need to account for the orders yourself. How to do it is in the articles section.
We (mere mortals) don't get it! ;)))
I'm going to read a little bit of my vacuum ))))
Can you advise me, when orders are reopened using rollover, is slippage possible for stop and takeaway values? And how will the stop be set if after the rollover the difference between the open and stop price will be less than the stop level?
My task is as follows. If i have an open market order, i should check if it was opened with rollover and if it was, i should get the ticket of the previous order, that was closed. Maybe someone will tell me the search algorithm? I am currently doing the following:
1. I select the first open order.
2. If it was opened from 23:40 to 00:20, then I continue to check this order further (40-minute window is taken just in case, although in theory you could take from 23:50 to 23:59)
3. I remember the ticket, stop and take price
4. I check all closed orders on the history, where the comments contain the word swap and the currency pairs are the same
5. I compare data on stops and takeovers, if they match, here it is the required order pair, if not, I return to step 1
The answer has been found (personally), but I'll leave the post for history! :))))
----------------------------------
but here's the interesting thing about it...
I have a script (I got it off the net). it modifies an open order.
My idea was to take it as a whole, and insert it in my Expert Advisor as a user-defined function, and call it whenever needed.
The problem is that the compiler gives error "'MB_OK' - variable not defined G:\Program_Files_2\MT4-demo\experts\33.mq4 (153, 37)" - 3rd line from the end
But if you compile the script itself, all is clear!
I figured out what MV_OC is...but I don't understand why it works in the script, but it gets warned in the Expert Advisor?
It turns out that the line #include <WinUser32.mqh> must be present.
and this file is in include
let me brag...
you don't need any flags when modifying.
it is enough under if condition (cross-means for example)... to take reference to use function BUY and MODIFY in brackets {}
and in this way, the condition will propagate to both actions :))
like this
{My_buy ();
My_modify (); }
:))))))))))))))))))))))))
lottamer:
like this
{My_buy ();
My_modify (); }
:))))))))))))))))))))))))
Such a loose interpretation of the program code needs clarification:
:)))Such a loose interpretation of the program code requires clarification:
:)))why?
and can My_buy (a non-boolean variable) be checked for TRUE-FALSE ?
The modification goes for sure - the order is open - we need to set the stop-stocks...