Zerocode closings
  #1 (permalink)  
Old 09-27-2005, 02:03 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 Zerocode closings

I want to make a strategy where they have different closing methods.

What I mean is for example when its a buy then to close the indiactor has to go from x>0 to x<=0 and if sell then x<0 to x>=0. My problem is that Im not sure where to input that. Should I just not put anything in the close and then go in the code and add the line manually?

Thanks in advance
__________________
____________________________\¦/
___________________________(ò ó)
______________________o0o___(_)___o0o__
___¦_____¦_____¦_____¦_____¦_____¦_____¦
¦_____¦_____¦_____¦_____¦_____¦_____¦__
___¦_____¦_____¦_____¦_____¦_____¦_____¦
¦_____¦_____¦_____¦_____¦_____¦_____¦__
Reply With Quote
  #2 (permalink)  
Old 09-27-2005, 02:47 PM
scorpion's Avatar
Administrator
 
Join Date: Aug 2004
Posts: 1,981
Thanks: 122
Thanked 383 Times in 152 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

This will need a little auto and also manual work.

1. Add logics as in attached screenshot.
2. Find in code

IsClosing = (IsBuying == True)
and (x <= 0)

3. Add parenthesis

IsClosing = ((IsBuying == True)
and (x <= 0))

4. Compile in MT editor. That's it
Attached Images
File Type: png zerocode_gazuz_close.png (20.9 KB, 27 views)
Shark EA Ultimate
Actual Profits on Live Account: +1064%
Since Jan 2007. View Live Statements.
__________________
Make easy pips with the Advanced Economic Calendar for Forex Trading.
Reply With Quote
  #3 (permalink)  
Old 09-28-2005, 12:01 AM
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

Wow thanks,

now I see you put for IsBuying, should I also add it to IsSelling as well or is it purposely left out?
__________________
____________________________\¦/
___________________________(ò ó)
______________________o0o___(_)___o0o__
___¦_____¦_____¦_____¦_____¦_____¦_____¦
¦_____¦_____¦_____¦_____¦_____¦_____¦__
___¦_____¦_____¦_____¦_____¦_____¦_____¦
¦_____¦_____¦_____¦_____¦_____¦_____¦__
Reply With Quote
  #4 (permalink)  
Old 09-28-2005, 06:08 AM
scorpion's Avatar
Administrator
 
Join Date: Aug 2004
Posts: 1,981
Thanks: 122
Thanked 383 Times in 152 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

Yes, you can, but it's the same for this case. In case you need to change something, you should wrap the logics belong to IsSelling as well.
__________________
Make easy pips with the Advanced Economic Calendar for Forex Trading.
Reply With Quote
  #5 (permalink)  
Old 10-04-2005, 02:04 AM
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

I have another question, I am not sure if this will work but i will try after i post this. Can I put two:

AND IsBuying = True
AND x<=0
OR y<=0
OR Is Buying = True
AND x>=0
OR y>=0

Would this keep the y<=0 with the IsBuying or not?

Thanks
__________________
____________________________\¦/
___________________________(ò ó)
______________________o0o___(_)___o0o__
___¦_____¦_____¦_____¦_____¦_____¦_____¦
¦_____¦_____¦_____¦_____¦_____¦_____¦__
___¦_____¦_____¦_____¦_____¦_____¦_____¦
¦_____¦_____¦_____¦_____¦_____¦_____¦__
Reply With Quote
  #6 (permalink)  
Old 10-04-2005, 02:21 AM
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

Hah I think I actually answered my own question, just put everything that works with IsBuying or IsSelling in that paranthesis. Sorry that was a mistake on my part I wasnt thinking too clearly.

Im going to test this right now.

Thanks again scorpion
__________________
____________________________\¦/
___________________________(ò ó)
______________________o0o___(_)___o0o__
___¦_____¦_____¦_____¦_____¦_____¦_____¦
¦_____¦_____¦_____¦_____¦_____¦_____¦__
___¦_____¦_____¦_____¦_____¦_____¦_____¦
¦_____¦_____¦_____¦_____¦_____¦_____¦__
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
ZeroCode Expert Running 3 Majors (?) Scicronys MetaTrader and ZeroCode 8 12-12-2007 08:58 AM
Important: ZeroCode Final Release scorpion MetaTrader and ZeroCode 44 09-12-2006 11:59 PM
RE: RSI in ZeroCode ????? TurboTrader24 MetaTrader and ZeroCode 9 08-04-2005 03:28 AM
Important: ZeroCode Header in Compiled MQL files scorpion MetaTrader and ZeroCode 0 06-09-2005 08:59 AM


All times are GMT. The time now is 04:07 PM.
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

Main Menu

Economic Forecast