| 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 (1) | Thread Tools | Display Modes |
|
|||
|
Rsi Ea
I do not see why you use the same variable to open and to close trades, but it may work.
This may be the problem: "Order" is a global variable. So at the end of each run through the Start function it will be set to the last value it was assigned, and use that value for the beginning of the next run through. It you make it local (move it inside Start) it may fix it. Else you will have to reset it after last use of it. Good Hunting, Big Be |
|
|||
|
Quote:
In your EA, in the iCustom() function you use the current bar (the last 0). Try to check the signal only at bar close (set the last number to 1). Then at the first tick of the new candle, if the arrow is still there (and not repaint), the trade won't be a false signal. Note that I didn't checked it it repaints more than the current bar. But you get the idea. FerruFx
__________________
THE HEART of FOREX & THE PROBABILITY METER - Trade with 100% confidence and ... Stress Less!!! Coding services: Experts Advisors, indicators, alerts, etc ... more info by PM NEW: video presentation of the Probability Meter ... 24hrs action on the website |
|
|||
|
Problem with Modifying Orders
I have a problem with an EA modifying orders from other EA's and Manual Trades. I use multiple EA's - some that modify the orders but the EA's that modify the orders take into account orders not associated with the EA. How can I have it only modify orders pretaining to a particular EA and not every order that is open for that currency. Thanks.
Kevin |
|
||||
|
Quote:
Each ea can mark his orders by magic number. Use it to search in order pool for orders that you wish to be modified. In this case you can have other orders separated.
__________________
You need proffesional mql coder? Contact me! I will help you! ........................................ http://www.fxservice.eu/ ........................................ |
|
||||
|
Hi fungraphic. I moved your post.
I know you must have some hurry bue there is not need to post same twice. If somebody is interest in help it would reply.
__________________
|
|
|||
|
I need code for using the moving average as a stoploss. The stoploss would change as the moving average changed so it would effectively be an adaptive stoploss based upon the moving average. Thanks
|
|
|||
|
Tried this code. There will be a a static stop until the the price is above the moving averages for longs or below the moving average for shorts. Added code for a spread for the price of the last bar.
if(OrderType()==OP_BUY) // long position is opened { // check for trailing stop if(TrailingStop>0&&(MaTrend<Low[1]-Spread*POINT)) { OrderModify(OrderTicket(),OrderOpenPrice(),Trailin gStop,OrderTakeProfit(),0,Green); return(0); } } else // go to short position { if(TrailingStop>0&&(MaTrend>High[1]+Spread*POINT)) { OrderModify(OrderTicket(),OrderOpenPrice(),Trailin gStop,OrderTakeProfit(),0,Red); return(0); } } |
|
|||
|
Quote:
|
![]() |
| Bookmarks |
| Tags |
| candle time, CHinGsMAroonCLK, coders guru, expert advisor, forex, how to code, I_XO_A_H, mechanical trading, trading |
| Thread Tools | |
| Display Modes | |
|
|
LinkBacks (?)
LinkBack to this Thread: http://www.forex-tsd.com/metatrader-programming/554-how-code.html
|
||||
| Posted By | For | Type | Date | |
| Need an experienced programmer? - Page 2 | Post #0 | Refback | 09-24-2008 07:24 AM | |
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| How to code this? | iscuba11 | Metatrader 4 mql 4 - Development course | 1 | 08-03-2007 05:22 PM |