| 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 |
|
|||
|
move tp and sl...
hello, i need some help regarding the mt4 programming, hope friends in here can help me...
---------- Int StopLoss = 20; // 1st ticket OrderSend(Symbol(),OP_BUY,Lot,Ask,3,Ask-StopLoss*Point,Ask+15*Point, “buy”,MagicNumber,0,Aqua);OrderTime = Time[0]; // 2nd ticket OrderSend(Symbol(),OP_BUY,Lot,Ask,3,Ask-StopLoss*Point,Ask+30*Point, “buy”,MagicNumber,0,Aqua);OrderTime = Time[0]; // 3rd ticket OrderSend(Symbol(),OP_BUY,Lot,Ask,3,Ask-StopLoss*Point,Ask+100*Point, “buy”,MagicNumber,0,Aqua);OrderTime = Time[0]; -------- Let say from above programming, three tickets were open in a same time, 1. If 1st ticket profit, how to add program/modify StopLoss for 2nd and 3rd ticket at open price? 2. If 2nd ticket profit, how to add program/modify StopLoss for 3rd ticket at 1st target profit? 3. How to program to calculate the profit of all ticket after the trades are closed?
__________________
-------------- |
|
|||
|
how to include a file.txt in an mq4 file ??
Hi everybody
I've got a file (var.txt) with some variables //************var.txt*********************// double high_d1 = iHigh(NULL, PERIOD_D1, Current + 0); double low_d1 = iLow(NULL, PERIOD_D1, Current + 0); double highp1_d1 = iHigh(NULL, PERIOD_D1, Current + 1); double lowp1_d1 = iLow(NULL, PERIOD_D1, Current + 1); double sto14 = iStochastic(NULL, 0, 14, 3, 5, MODE_EMA, 0, MODE_MAIN, Current + 0); double sto14s = iStochastic(NULL, 0, 14, 3, 5, MODE_EMA, 0, MODE_SIGNAL, Current + 0); double sar = iSAR(NULL, 0, 0.02, 0.2, Current + 0); double open = iOpen(NULL, 0, Current + 0); double close = iClose(NULL, 0, Current + 0); //*******************************// and I want to put this file in an mq4 file (test.mq4) with the fonction "include" like this #include <var.txt> But the programm return this message : " #include <var.txt> cannot open the programm file" Is it possible to do that ? and how? Thanks in advance for your help!! |
|
||||
|
@ FerruFX
1.) i try to explain my ideas for the entry/exit moneymanagment in the next days, please send me your email per MP (but its not easy, im not a "native english speaker"...) 2.) could you look over the EA once more - the control function works great, but now this function will avoid that the EA switch the position from long to short ore short to long by itself if a new signal comes out - the EA will now only entry into a trade, if the position is stopped out or reached its take profit, but often the EA should switch after a period of time. is it possible to get the "switch position" function working beneth the "control function" ? i hope you can understand what im trying to tell.. thank you for the help clarc |
|
|||
|
I sent you a PM 2 days ago.
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 |
![]() |
| 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 |