#31 (permalink)  
Old 06-05-2005, 10:57 PM
Rastarr's Avatar
Senior
 
Join Date: Mar 2005
Posts: 114
Thanks: 0
Thanked 0 Times in 0 Posts
Rastarr is a glorious beacon of lightRastarr is a glorious beacon of lightRastarr is a glorious beacon of lightRastarr is a glorious beacon of lightRastarr is a glorious beacon of light
Send a message via ICQ to Rastarr Send a message via AIM to Rastarr Send a message via Yahoo to Rastarr
Default

Hey Scorpion,

Fantastic job, mate - well done.

I've got a little project I'd like to use ZeroCode on which just uses time of day and price direction and goes a little like this:-

After the open of the new day bar approx at 5 am EST, wait for the market to move away from the opening price and then set a trade in the opposite dierction when the market crosses the opening price again. limit of 20 pts profit and S/L at the cross point.

I'm not entirely sure if ZeroCode has time functions builtin. Any help or walkthrough instructions on this one will help me as well as quite a lot of other ZeroCode users, I suspect.

Cheers
Martin
ProFX Powerful Trading System
  #32 (permalink)  
Old 06-05-2005, 11:17 PM
scorpion's Avatar
Administrator
 
Join Date: Aug 2004
Posts: 1,957
Thanks: 114
Thanked 380 Times in 151 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

Hey, nice that you've made your own CCI system with ZeroCode.

Yes, "Previous" means CLOSE PRICE of previous bar and "Current" means CURRENT PRICE. These two bars are the most commonly used, so I put these by default in the popup menu. I can put another one for a period of bars back. But I need 3 more "YES" from other traders.

Quote:
is it possible to make the expert only run at certain hours?
Yes, it is possible. I can code that, but it would be better if someone point to an expert that uses this feature.

Anyway, Is VT open for download? I'd like to check that program, in case I can make ZeroCode produce the script for it.
__________________
Make easy pips with the Advanced Economic Calendar for Forex Trading.
  #33 (permalink)  
Old 06-06-2005, 12:09 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

The "10 minute strategy" does use it, I coded it succesfully but remembered it mostly worked at some times of the day. That is why I am looking for a way to do so.

Also is is MetaTrader that always has problems backtesting? everytime I test an expert it wont do Buy and Sell but only Buy....

Just pointing that out.

I dont know if VT is up for download but I'm gonna try to visit their office next weekend I'm going to New York with my family so I'll be going up the empire state building and I'll try to get a view of the stock pit
__________________
____________________________\¦/
___________________________(ò ó)
______________________o0o___(_)___o0o__
___¦_____¦_____¦_____¦_____¦_____¦_____¦
¦_____¦_____¦_____¦_____¦_____¦_____¦__
___¦_____¦_____¦_____¦_____¦_____¦_____¦
¦_____¦_____¦_____¦_____¦_____¦_____¦__
  #34 (permalink)  
Old 06-06-2005, 12:29 AM
scorpion's Avatar
Administrator
 
Join Date: Aug 2004
Posts: 1,957
Thanks: 114
Thanked 380 Times in 151 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

Gazuz, I'll take a look at "10 mins" expert, see if I can correct it.

Hey, watch the video walkthrough of creating a simple MACD Crossover expert at http://www.fxfisherman.com/forums/showthread.php?t=121.
__________________
Make easy pips with the Advanced Economic Calendar for Forex Trading.
  #35 (permalink)  
Old 06-06-2005, 09:00 AM
Rastarr's Avatar
Senior
 
Join Date: Mar 2005
Posts: 114
Thanks: 0
Thanked 0 Times in 0 Posts
Rastarr is a glorious beacon of lightRastarr is a glorious beacon of lightRastarr is a glorious beacon of lightRastarr is a glorious beacon of lightRastarr is a glorious beacon of light
Send a message via ICQ to Rastarr Send a message via AIM to Rastarr Send a message via Yahoo to Rastarr
Default

Hi again,

Thought I'd give a little bit of feedback which might help in the development of ZeroCode.

I'm no MQL programmer but have some experience with MQ4. Ideally, if I'm playing around with ZeroCode, I'd like to be able to save the state of the ZeroCode logic, so maybe being able to save and load raw ZeroCode logic to a .zco file might be a future feature ?

Secondly, there needs to be some form of conditional logic not based solely on indicators i.e. consider this reasonably simple expert I alluded to above.

If Chart = Daily then
If Current Time = Bar Open Time + 4 hours then
If Bar Open Price > Current Price
Then
Place Buy Limit Order (at Bar Open Price) with S/L (Bar Low) with Profit (20 pips) and expire order in 24 hours
Else
Place Sell Limit Order (at Bar Open Price) with S/L (Bar High) with Profit (20 pips) and expire order in 24 hours

Not that big an expert really but is dependent (from what I can see) on Time and Bar type functions. I'm sure there's many others and you have probably already thought of them. ZeroCode is after all just in an early Beta 1 phase.

Hope this helps in some way
Martin
  #36 (permalink)  
Old 06-06-2005, 09:52 AM
scorpion's Avatar
Administrator
 
Join Date: Aug 2004
Posts: 1,957
Thanks: 114
Thanked 380 Times in 151 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

First of all, thanks to your suggestion very much.

Quote:
Originally Posted by Rastarr
Secondly, there needs to be some form of conditional logic not based solely on indicators i.e. consider this reasonably simple expert I alluded to above.

If Chart = Daily then
If Current Time = Bar Open Time + 4 hours then
If Bar Open Price > Current Price
Then
Place Buy Limit Order (at Bar Open Price) with S/L (Bar Low) with Profit (20 pips) and expire order in 24 hours
Else
Place Sell Limit Order (at Bar Open Price) with S/L (Bar High) with Profit (20 pips) and expire order in 24 hours
Actually, ZeroCode Beta 1 already support this condition. In next beta, this feature will be out interactively in the popup menu with indicators. One thing is not yet code is Entry Order instead of Market order option. Try below logics:

Buy logics:
AND Period = 1440
AND Hour = 4
AND Open > PriceBid

Sell logics:
AND Period = 1440
AND Hour = 4
AND Open <= PriceBid

In summary, next betas features:

- MQ4 support
- Custom indicator support
- Save the system (indicators and logics) to file
- Buy and Sell Entry Orders support
- More advance functions in popup menu

__________________
Make easy pips with the Advanced Economic Calendar for Forex Trading.
  #37 (permalink)  
Old 06-06-2005, 10:17 AM
Rastarr's Avatar
Senior
 
Join Date: Mar 2005
Posts: 114
Thanks: 0
Thanked 0 Times in 0 Posts
Rastarr is a glorious beacon of lightRastarr is a glorious beacon of lightRastarr is a glorious beacon of lightRastarr is a glorious beacon of lightRastarr is a glorious beacon of light
Send a message via ICQ to Rastarr Send a message via AIM to Rastarr Send a message via Yahoo to Rastarr
Default

Scorpion,

Thanks for the newbie coding help - appreciated.
I plugged all that in and produced an mql which I've attached.

Last code block as follows doesn't make much sense to me on the entry conditions - both buy and sell would produce the same in my opinion.
Code:
// Check for BUY entry signal If IsBuying and IsSelling=False and IsClosing=False then { // Buy If StopLoss>0 then { RealSL=Ask-StopLoss*Point; } If TakeProfit>0 then { RealTP=Ask+TakeProfit*Point; } SetOrder(OP_BUY,Lots,Ask, Slippage,RealSL,RealTP,RED); Alert("Reversal Beta 1: Buying"); }; // Check for SELL entry signal If IsSelling and IsBuying=False and IsClosing=False then { // Sell If StopLoss>0 then { RealSL=Bid+StopLoss*Point; } If TakeProfit>0 then { RealTP=Bid-TakeProfit*Point; } SetOrder(OP_SELL,Lots,Bid,Slippage,RealSL,RealTP,RED); Alert("Reversal Beta 1: Selling"); };
As an aside, can placing Limits simply be a find/replace on the Buy/Sell instructions ? Forgive my lack of knowledge on mql

Cheers
Martin
Attached Files
File Type: mql Reversal Beta 1.mql (4.5 KB, 20 views)
Shark EA Ultimate
Actual Profits on Live Account: +975%
Since Jan 2007. View Live Statements.
  #38 (permalink)  
Old 06-07-2005, 12:22 AM
scorpion's Avatar
Administrator
 
Join Date: Aug 2004
Posts: 1,957
Thanks: 114
Thanked 380 Times in 151 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

Rastarr,

Sell and Buy will not happen at the same time, unless you give the same logics to both Buy and Sell.

Quote:
As an aside, can placing Limits simply be a find/replace on the Buy/Sell instructions ? Forgive my lack of knowledge on mql
Yes, you can find & replace SetOrder(OP_BUY,Lots,Ask, Slippage,RealSL,RealTP,RED) and SetOrder(OP_SELL,Lots,Bid,Slippage,RealSL,RealTP,R ED)
__________________
Make easy pips with the Advanced Economic Calendar for Forex Trading.
  #39 (permalink)  
Old 06-07-2005, 07:16 AM
Rastarr's Avatar
Senior
 
Join Date: Mar 2005
Posts: 114
Thanks: 0
Thanked 0 Times in 0 Posts
Rastarr is a glorious beacon of lightRastarr is a glorious beacon of lightRastarr is a glorious beacon of lightRastarr is a glorious beacon of lightRastarr is a glorious beacon of light
Send a message via ICQ to Rastarr Send a message via AIM to Rastarr Send a message via Yahoo to Rastarr
Default

Thanks Scorpion for the info - most helpful.

It's at least allowed me to hack the resultant MQL into what I was trying to achieve given my redementary knowledge.

Thanks
Martin
Good job with ZeroCode
  #40 (permalink)  
Old 06-07-2005, 03:06 PM
Freshman
 
Join Date: Jun 2005
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
11050204 is on a distinguished road
Thumbs up Good job with ZeroCode

Hi,
I downloaded the ZeroCode yesterday and I already think that this thing is a marvel. You did an incredible job in making this program for all the dummies like me. It will probably help me understand how to program on Metatrader. I think that you should add an «open file» so we could be able to modify our code after back-testing it. It would be nice to have the same program but for custom indicator.

Good job

JF
Closed Thread


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
Custom Code request : Action breakeven stop Automatic Digs Trading Systems 0 09-24-2006 06:43 AM
RSI - MQL II Indicator Statement Problem Dave77 MetaTrader and ZeroCode 2 07-16-2005 11:33 PM
Testing MQL Code with Interbankfx.com Dave77 MetaTrader and ZeroCode 4 06-21-2005 10:54 PM
Zero code beta 2 suggestions Belzebut MetaTrader and ZeroCode 0 06-12-2005 09:40 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 03:01 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