Help with Programming Straddle in Zerocode?
  #1 (permalink)  
Old 05-19-2006, 03:03 PM
Freshman
 
Join Date: Nov 2005
Posts: 15
Thanks: 0
Thanked 0 Times in 0 Posts
Toddr is on a distinguished road
Default Help with Programming Straddle in Zerocode?

How do I program a straddle in Zerocode to put a Buy Stop 10 pips above the current price and a Sell Stop below the current price? Also can I program this only to happen at a certain time (7:29am CST)?

Thank you

Todd
Reply With Quote
ProFX Powerful Trading System
  #2 (permalink)  
Old 05-20-2006, 02:11 AM
scorpion's Avatar
Administrator
 
Join Date: Aug 2004
Posts: 1,956
Thanks: 113
Thanked 375 Times in 149 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

Only market order is possible for now. But in your case, you can produce same system with just market order.

1. Enter this in ZeroCode:

Buy logics:
Bid > LastPrice + (10 * Point)

Sell logics:
Bid < LastPrice - (10 * Point)


2. In the mql file, find // Calculate indicators' value

3. Below that, add these code:

PHP Code:
var: LastPrice(0), LastTime(0);
if 
TimeDay(LastTime) != Day() and Hour()=and Minute()=29 then
{
    
LastPrice Bid;
    
LastTime CurTime();

4. In above code, you may change Hour()=7 and Minute()=29 to whatever time you like. But it's in broker's timezone, not CET! So be sure to modify this to correct time.
__________________
Make easy pips with the Advanced Economic Calendar for Forex Trading.

Last edited by scorpion : 05-20-2006 at 02:14 AM.
Reply With Quote
  #3 (permalink)  
Old 05-20-2006, 02:26 AM
scorpion's Avatar
Administrator
 
Join Date: Aug 2004
Posts: 1,956
Thanks: 113
Thanked 375 Times in 149 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

Do you also want to limit one trade per day?
__________________
Make easy pips with the Advanced Economic Calendar for Forex Trading.
Reply With Quote
  #4 (permalink)  
Old 05-20-2006, 11:39 AM
Freshman
 
Join Date: Nov 2005
Posts: 15
Thanks: 0
Thanked 0 Times in 0 Posts
Toddr is on a distinguished road
Default

The EA attached has the pending orders I am looking for except I want them to go off the current price. Anyway to marry this code into Zerocode?
Attached Files
File Type: mql breakout_advisor.mql (10.5 KB, 15 views)
Sponsored Links Shark EA Ultimate
Actual Profits on Live Account: +975%
Since Jan 2007. View Live Statements.
Reply With Quote
  #5 (permalink)  
Old 05-31-2006, 07:15 AM
Freshman
 
Join Date: Jun 2005
Posts: 14
Thanks: 0
Thanked 0 Times in 0 Posts
rondio is on a distinguished road
Default

Scorp,

i would like help compling something simular using MT4. buy when current price is (x) pips above the bar open price, and sell when current price is (x) pips below the open price. i would like the number of pips to be user definable so i can use the optimize function in MT4. any help would be appreciated.

todd
Reply With Quote
  #6 (permalink)  
Old 06-02-2006, 10:03 AM
scorpion's Avatar
Administrator
 
Join Date: Aug 2004
Posts: 1,956
Thanks: 113
Thanked 375 Times in 149 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

__________________
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
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 02:28 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

Main Menu

Economic Forecast