| 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 |
|
|||
|
Quote:
if(Show_Settings) subPrintDetails(); else Comment(""); 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 |
|
|||
|
EA variable values lost when closing MT4
Hello All,
I have searched and tried a number of solutions to my question, but can't find any that work. I am programming an EA and the trades are handled by their ticket numbers. Ticket numbers are stored in an int variable. This runs fine in Strategy Tester or on a continuous uninterrupted MT4, however if you close MT4, ofcourse the tickets are lost and when MT4 reloads, the ticket numbers have been lost, hence the EA doesn't know which trades are currently open and starts to open new ones. Even if the pending or open orders are already trading. I hope this makes sense. I have tried static variables and I do know about global variables, but I would prefer not to use them, as each ticket number and variable wants to be individual to the chart TF and Symbol the EA is running on. Does anyone have a simple solution. I do know that you could probably export the ticket numbers to a file that the EA can then open and read, but this seems a long way around. A not so neat way I am currently testing is on program start to use the SELECT_BY_POS function, looking for each trade with a Magic number the same, but this doesn't allow the full functionality of the EA I as I sometimes run 2 buys at the same time and identifiying which is which is hard. Thanks for any replies. ![]() |
|
|||
|
Quote:
Dave ![]() |
|
|||
|
EA modification
Hello
Would very much appreciate if someone could help me out. There is this EA I got from another FX forum. It looks great but would appreciate if someone can help make some modifications on it. I have tried the little I think I know but it keeps giving me errors of unbalanced brackets e.t.c The EA opens 5lots and takes profit of 1 lot each at a specified incremental value (say 50 points/pips). So it closes 1 lot each time the profit increases by a specified number and finally allows the fifth/last lot to run till there is an opposite signal. Modifications: I want it to open only 3 lots, Close 1 lot each as profit increases at a specified no. of pips After the first two Take profit points have been reached, a trailing Stop should be used for the third. Illustration: 3 lots Incremental TP point= 40 pips 1st lot TP = 40, stoploss moved to BE 2nd lot TP= 80 3rd lot = Trailing stop activated Every other thing is already in the EA, but I just need to change the lot size and add a trailing stop. Thanks |
|
|||
|
Quote:
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 |
|
|||
|
drawing a line and draw a up/down arrow on a candle
Im tring to program a very simple indicator to draw a line and draw a up/down arrow on a candle.
I cant figure out how to use those style, index, draw etc. I have a very simple if statement inside Start(), so what else do I need to add before Start(), and within Start()'s if, to draw a line, and up arrow, and down arrow? Thanks. |
|
|||
|
Quote:
Code an indicator isn't a simple job. You may have to learn some basics of mql coding. Wish you all the best in your learning process. 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 |
|
|||
|
help
Hello Fellow Programmers,
I have an EA that trades on EURUSD when I attach it to the EURUSD chart. Question is how can I trade multiple pairs without having to attach my EA to multiple charts? Something like this? string pairs = "GBPUSD;EURUSD;USDCHF;USDJPY;USDCAD;GBPJPY;EURJPY; GBPCHF;EURAUD;EURCHF;EURGBP;AUDUSD;CHFJPY"; Thanks in advance, LF |
![]() |
| 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 |