| New signals service! | |
|
|||||||
| Register in Forex TSD! | |
|
Trading Systems Leaders in this forum (automated trading systems) are winning more than 3000 pips in a month (30000$ investing one lot every time). Click here to register and get more information |
|
![]() |
|
|
LinkBack | Thread Tools | Display Modes |
|
|||
|
Quote:
I ran my program and it not works, it does not move my pending orders. I think that maybe the syntax of my pending orders does not correspond to this function. Would You please check my pending orders here: OrderSend(Symbol(),OP_BUYSTOP,0.1,Ask+10*Point,3,A sk-10*Point,Ask+20*Point," aaa ",0,0,Green); OrderSend(Symbol(),OP_SELLSTOP,0.1,Bid-10*Point,3,Bid+10*Point,Bid-20*Point," aaa ",0,0,Green); Thanks a lot. Last edited by Iva; 08-04-2007 at 05:02 AM. |
|
||||
|
I would like to include this with my ea, that not only stops the EA from Trading, but also closes all active buy or sell positions of that particular currency being traded before the market closes. I have a tendency to forget about the market close and end up having open positions after the market closes over the weekend - Risky!!!
Your expertise will be sincerely appreciated!!! Dave <><<< |
|
|||
|
No experts here.
Only code! Just compile it - works. PHP Code:
If you want a different day or different hour, just change parameters of the EA.
__________________
MQL4 programming is easy ^^ |
|
||||
|
Clarifications
#1: I will not post threads in the MQL4 section. Nobody goes there. I checked the date on people's questions, and the date or the right reply. 13 days, 7 days,4 days, sometimes even more.
#2: Codersguru, I think quit this forum. He never writes anymore. Anyway, this is the best section. Can some1 help me for the following? If buystop triggered, then sellstop is deleted. ---Julia--- |
|
||||
|
Here is proof of what I have to a question.
Why does it modify both my sellstop and buystop, and suddenly, only my buystop? PHP Code:
PHP Code:
|
|
|||
|
To keep it simple, you have to count the orders which OrderType() == Op_BUY. and those which OrderType() == OP_BUYSTOP. If those counts are different from the previous, (OP_BUY -> +1 and OP_BUYSTOP -> -1) you can assume that a BuyStop has triggered.
If there is only one (or few) BuyStop, you can also keep in memory it's ticket from the OrderSend() and check the variation of it's OpenTime : when a pending is triggered, the OpenTime is modified according to the trigger time. Then you just have to scan all the orders, and when you find a SellStop, delete it. BTW, are you Dan ? |
|
|||
|
Speed programming
1) When I run my program, usually sell stop and buy stop pop up. But, sometimes only one pending order pops up.When I was debugging, I noticed that one time first market tick created one pending order, and another tick created another pending order.
Strange??The market was not volatile. 2) The program also adjusts pending orders. It runs good until certain time (usually about 45 seconds) and then stops modifying some one pending order. 3)When market goes 1 tick down, then in about 1-2 seconds the pending orders go 1 tick down too. It looks to me that the codes does not catch all market ticks. My question is ; is there some available function (e.g. RefreshRates() that makes the code to catch all the ticks and process them Thank you all. |
![]() |
| Bookmarks |
| Tags |
| automated close order, close, eas, forex, learn mql4, learn mql4 video, mql4 learning, OrderCloseBy, profit, reach, secure profit function, T101_v1.11_orest_IBFXm.mq4, learning mql4 |
| Thread Tools | |