| 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 |
|
|||
|
Dear Expert Advisors! pl. advise on refreshing buffers code
Dear Experts Advisors! Please give me advise on refreshing buffers (just good advise)
![]() there is code (patch, fix, upgrade) by Raff 4 multitimeframe (MTF) indicators, working pretty good; what could be similar code you can add to regular (not mtf) indicators? If possible, please, give example, thank you //---- Refresh buffers +++++++++++++++++++++ upgrade by Raff if (TimeFrame>Period()) { int PerINT=TimeFrame/Period()+1; datetime TimeArr[]; ArrayResize(TimeArr,PerINT); ArrayCopySeries(TimeArr,MODE_TIME,Symbol(),Period( )); for(i=0;i<PerINT+1;i++) {if (TimeArr[i]>=TimeArray[0]) { //---- /************************************************** *** Refresh buffers: buffer[i] = buffer[0]; ************************************************** ****/ Buffer1[i]= Buffer1[0]; Buffer2[i]= Buffer2[0]; Buffer3[i]= Buffer3[0]; //---- } } } //+++++++++++++++++++++++++++++++++++++++++ Raff ++++++ |
|
|||
|
Small thread about it with code http://www.forex-tsd.com/metatrader-...-function.html
|
|
|||
|
I'm trying to code a set of alerts including some RSI related, but actually i'm stuck at this point:
I slimply cant figure how to make the code to alert the point of re-entry in 30-70 RSI levels. I would be very happy if someone could explain me how to do it. Thank you for your time. pente |
|
|||
|
For information:
- RSI with alert is here http://www.forex-tsd.com/137631-post679.html - everything about RSI is here: http://www.forex-tsd.com/setup-quest...indicator.html - the other RSI with alert is in elite indicators' thread in elite section. ----------------------------- pentesileia, I am not a coder but I know that it is something with two values of the indicator. For example, we have i bar and i+1 bar (it is the same as 1st bar and 2nd bar). So, RSI on i bar is below 70 and RSI of i+1 bar (previous bar) is above 70. It is the crossing. And opposite for 30 for example. It is not difficult to code. |
|
|||
|
EA To Close Position By Indicator
//+---------------------------------------------
CLOSE POSITION BY INDICATOR //+--------------------------------------------- if ( iCCI ( NULL, PERIOD_H1, 50, PRICE_TYPICAL, 1) { total = OrdersTotal(); for(int i=total-1;i>=0;i--) { OrderSelect(i, SELECT_BY_POS); int type = OrderType(); bool result = false; switch(type) { case OP_BUY : result = OrderClose( OrderTicket(), OrderLots(), MarketInfo(OrderSymbol(), MODE_BID), 1, Aqua ); break; case OP_SELL : result = OrderClose( OrderTicket(), OrderLots(), MarketInfo(OrderSymbol(), MODE_ASK), 1, Tomato ); } if (UseSound) PlaySound(NameFileSoundClose); } { return(0); } //+--------------------- end of script -------------------------------- Hi, Anyone could help me to solve this problem, when I compile the 2 errors occurs : ‘UseSound’ – variable not defined. ‘NameFileSoundClose’ – variable not defined. What should I do ? And, I do not know whether this code is to CLOSE for OPEN SELL or OPEN BUY POSITION. How do I set the code for different INDICATOR to CLOSE for OPEN SELL and OPEN BUY POSITION. Thank you. |
|
|||
|
How to increase lot size after loss??
Does anyone know enough about programing an EA to help me out a little.
I have a pretty good EA but would like to have it increase the lot size only after a drop in equity or a loosing trade but I'm not sure how to program that in. Can anyone give me some help?? Thanks!! |
|
|||
|
Chick Gosling
How can i create this code from metastock to MT4
factor:= 2.43; sp:= 3; ip:= 10; lp:= 16; sl:= (Mov(CLOSE,sp,S)-Mov(CLOSE,ip,S))/(((((Mov(CLOSE,ip,S)+factor*Mov(CLOSE,ip,S) )*0.333)-Mov(CLOSE,ip,S))/100)); ml:= Mov(sl,lp,S); ml; sl; |
![]() |
| 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 |