| 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 |
|
|||
|
not plot in real time
I downloaded an indicator called modtrade, it plot fine when you first place it on a chart, but it will not update correctly in real time, could someone help me to correct this?
//modtrade #property copyright "Copyright © 2007, modulatum" #property indicator_separate_window #property indicator_buffers 3 #property indicator_level1 0 #property indicator_color1 Aqua #property indicator_color2 Red #property indicator_color3 Crimson extern double sensitivity = 1; extern int l_resolution = 50; extern int v_resolution = 1; extern int minutes = 0; //extern int start = 0; double drawBuffer[], drawBuffer2[], drawBuffer3[]; int init() { SetIndexStyle(0, 12); SetIndexBuffer(0, drawBuffer); SetIndexStyle(1, 12); SetIndexBuffer(1, drawBuffer2); SetIndexStyle(2, DRAW_HISTOGRAM, 1,3); SetIndexBuffer(2, drawBuffer3); return(0); } int deinit() { return(0); } int start() { l_resolution = MathAbs(l_resolution); int i,x,counted_bars=IndicatorCounted(); i=Bars-counted_bars-1; while(i>=0){ double allCloses = iClose(NULL,minutes,i-(10*v_resolution)) + iClose(NULL,minutes,i-(1*v_resolution)) + iClose(NULL,minutes,i-(2*v_resolution)) + iClose(NULL,minutes,i-(3*v_resolution)) + iClose(NULL,minutes,i-(4*v_resolution)) + iClose(NULL,minutes,i-(5*v_resolution)) + iClose(NULL,minutes,i-(6*v_resolution)) + iClose(NULL,minutes,i-(7*v_resolution)) + iClose(NULL,minutes,i-(8*v_resolution))+ iClose(NULL,minutes,i-(9*v_resolution)); double allOpens = iOpen(NULL,minutes,i-(10*v_resolution)) + iOpen(NULL,minutes,i-(1*v_resolution)) + iOpen(NULL,minutes,i-(2*v_resolution)) + iOpen(NULL,minutes,i-(3*v_resolution)) + iOpen(NULL,minutes,i-(4*v_resolution)) + iOpen(NULL,minutes,i-(5*v_resolution)) + iOpen(NULL,minutes,i-(6*v_resolution)) + iOpen(NULL,minutes,i-(7*v_resolution)) + iOpen(NULL,minutes,i-(8*v_resolution))+ iOpen(NULL,minutes,i-(9*v_resolution)); double allrange = allCloses - allOpens; double v1 = allrange; drawBuffer[i] = v1; double v1a = drawBuffer[i+(1*l_resolution)]+drawBuffer[i+(2*l_resolution)]+drawBuffer[i+(3*l_resolution)]+drawBuffer[i+(4*l_resolution)]+drawBuffer[i+(5*l_resolution)] + drawBuffer[i+(6*l_resolution)]+drawBuffer[i+(7*l_resolution)]+drawBuffer[i+(8*l_resolution)]+drawBuffer[i+(9*l_resolution)]+drawBuffer[i+(10*l_resolution)]; double v1b = (v1a)/10; drawBuffer2[i] = v1b; double bDiff = (v1 - v1b); drawBuffer3[i]=bDiff*5; i--; } return(0); } |
|
|||
|
PHP Code:
Try this... PHP Code:
Lux
__________________
Build An Expert Advisor. FREE E-course As Seen On TV ![]() ForexArea.com Users of Gap Trader from 'Forex-Assistant' MUST Read This Last edited by luxinterior; 08-27-2007 at 04:12 AM. |
|
|||
|
The problem is that there is no space between PipsProfit and '+' and a space between '=' and '+' ......
- in other words it should be like this ->Code:
else if (OrderType() == OP_SELL) PipsProfit += ((OrderOpenPrice() - Ask)/Point);
{
|
|
|||
|
Coding Question
I know an EA can be coded to only trade Demo accounts. Can I also code an EA NOT to trade on PAMM accounts? This would allow the EA to trade on live accounts, but not be used for money managers to trade PAMM accounts - unless there was a separate license agreement.
|
|
|||
|
comma separated extern variable(s)
Hi,
for an indicator I use I have to set the digits for each symbol. I do this in the code with e.g. PHP Code:
PHP Code:
(Or is there a better solution for this "digits problem" out there?) Thanks |
![]() |
| 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 |