Need expertise to fix 2 problems - Please!
  #1 (permalink)  
Old 07-20-2005, 09:24 AM
Sophomore
 
Join Date: Jun 2005
Posts: 48
Thanks: 0
Thanked 0 Times in 0 Posts
Dave77 is a jewel in the roughDave77 is a jewel in the roughDave77 is a jewel in the roughDave77 is a jewel in the rough
Smile 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;
Reply With Quote
  #2 (permalink)  
Old 09-22-2005, 01:17 PM
gazuz's Avatar
Senior Trader and Moderat
 
Join Date: Aug 2004
Posts: 768
Thanks: 1
Thanked 8 Times in 5 Posts
gazuz is a name known to allgazuz is a name known to allgazuz is a name known to allgazuz is a name known to allgazuz is a name known to allgazuz is a name known to all
Default

Just bumping this thread to see if theres anyone that can fix it now
__________________
____________________________\¦/
___________________________(ò ó)
______________________o0o___(_)___o0o__
___¦_____¦_____¦_____¦_____¦_____¦_____¦
¦_____¦_____¦_____¦_____¦_____¦_____¦__
___¦_____¦_____¦_____¦_____¦_____¦_____¦
¦_____¦_____¦_____¦_____¦_____¦_____¦__
Reply With Quote
  #3 (permalink)  
Old 09-22-2005, 02:37 PM
scorpion's Avatar
Administrator
 
Join Date: Aug 2004
Posts: 1,922
Thanks: 97
Thanked 361 Times in 147 Posts
scorpion is a splendid one to beholdscorpion is a splendid one to beholdscorpion is a splendid one to beholdscorpion is a splendid one to beholdscorpion is a splendid one to beholdscorpion is a splendid one to beholdscorpion is a splendid one to beholdscorpion is a splendid one to behold
Send a message via MSN to scorpion Send a message via Yahoo to scorpion
Default

>> For shift = Bars 1 Downto 0 Begin

Should change to:

For shift = Bars Downto 0 Begin
__________________
Make easy pips with the Advanced Economic Calendar for Forex Trading.
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


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 02:27 AM.
Powered by vBulletin Version 3.6.2
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