Need expertise to fix 2 problems - Please!
|
|||
|
I picked this program up from a forum. It came in MQL and .exp. I wanted to adjust the MQL file to new parameters and after I did I found I had an error. The error reads: 22;16;1;50;some operator expected - token "1".
If the first numbers are line numbers, how can I get the editor to add line numbers to the displayed programming? What do these numbers mean? And what is the fix for this if you could look at the program below? The second and last problem with this little program is that it puts the Buy Green Dot and the Sell Red Dot over the bar to the left of the current bar instead of the current bar. With your experience could you figure out a fix that would keep this from happening so it will work right and place the dot over the current "latest" bar? Any and all help is sincerely appreciated by me. Thank you in advance! Dave77 /*[[ Name := Author := Link := Separate Window := No Separate Window := No First Color := Red First Draw Type := Symbol First Symbol := 108 Use Second Data := Yes Second Color := Green Second Draw Type := Symbol Second Symbol := 108 ]]*/ Input : FastPeriod(4), SlowPeriod(15); Variable : shift(0); Variable : iMASlowPrevious(0), iMaSlowCurrent(0), iMaFastPrevious(0), iMaFastCurrent(0); Variable : val1(0), val2(0); SetLoopCount(0); For shift=Bars 1 Downto 0 Begin val1=0; val2=0; iMaSlowPrevious = iMAEx(SlowPeriod, MODE_LWMA, 0, PRICE_WEIGHTED, shift-1); iMaSlowCurrent = iMAEx(SlowPeriod, MODE_LWMA, 0, PRICE_WEIGHTED, shift); iMaFastPrevious = iMAEx(FastPeriod, MODE_LWMA, 0, PRICE_CLOSE, shift-1); iMaFastCurrent = iMAEx(FastPeriod, MODE_LWMA, 0, PRICE_CLOSE, shift); If iMaFastPrevious<iMaSlowPrevious and iMaFastCurrent>iMASlowCurrent Then val1=High[shift]; If iMaFastPrevious>iMaSlowPrevious and iMaFastCurrent<iMASlowCurrent Then val2=Low[shift]; SetIndexValue(shift,val1+0*point); SetIndexValue2(shift,val2-0*point); End; |
![]() |
![]() |
«
Previous Thread
|
Next Thread
»
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| ZeroCode Beta 2 Status | scorpion | MetaTrader and ZeroCode | 85 | 06-21-2008 04:11 PM |
| Trading E-Books Download | jgrimney | Tutorials, Tips & Tricks | 46 | 09-28-2007 07:32 PM |
All times are GMT. The time now is 04:57 AM.
Powered by vBulletin Version 3.6.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.1.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.1.0
Registered members have access to special online forex currency trading tools, software, mt4 expert advisors and indicators. Register now










Linear Mode


