Double entry rules
  #1 (permalink)  
Old 06-21-2005, 07:01 PM
TraderSeven's Avatar
Sophomore
 
Join Date: Jun 2005
Posts: 86
Thanks: 0
Thanked 1 Time in 1 Post
TraderSeven is a glorious beacon of lightTraderSeven is a glorious beacon of lightTraderSeven is a glorious beacon of lightTraderSeven is a glorious beacon of lightTraderSeven is a glorious beacon of light
Default Double entry rules

I want to open a position if the price crosses an MA. (Buy)
But once the position is open I want to add to that position if the opening price is still above the MA.

That gives me 2 problems.
a] How to enter 2 'buy types' in ZeroCode and making sure they are executed in the right order.

b] During the day MT checks that rule a million times. If the price stays above the MA that would mean a million buys.
My account is to small for such large positions

Is it possible in ZeroCode?
__________________
If your system fails just swap long & short :whistling
Reply With Quote
  #2 (permalink)  
Old 06-22-2005, 04:21 AM
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

Not sure what exactly you want, but below is a simple buy rule that buy when bid price crosses up the MA (x).

PriceBid < MA (x) Previous
AND PriceBid > MA (x) Current
__________________
Make easy pips with the Advanced Economic Calendar for Forex Trading.
Reply With Quote
  #3 (permalink)  
Old 06-22-2005, 02:02 PM
TraderSeven's Avatar
Sophomore
 
Join Date: Jun 2005
Posts: 86
Thanks: 0
Thanked 1 Time in 1 Post
TraderSeven is a glorious beacon of lightTraderSeven is a glorious beacon of lightTraderSeven is a glorious beacon of lightTraderSeven is a glorious beacon of lightTraderSeven is a glorious beacon of light
Default

A crossover. That's a part of the problem. But not even really needed.
The 1st buy will indeed be when a price crosses above the MA. (if a gap is also seen as a crossover)
But opening above the MA is also a buy.
But there will be only 1 buy per day. Bouncing prices could trigger a buy 10 times a day.

So simply put I want the following:
If price>MA AND First_Trade_of_the_day = TRUE THEN buy.

Other question.
Am I allowed to ask a ton of coding questions on this board?
Or is it more for exchanging trading ideas.
If yes then maybe a seperate forum could keep other sections less poluted.
I need get some help to get started with the MT4 code.
ATM it's a bit over my head. MT4 is spaghetti code. I'm more the type of person that splits things up in subrountines.
__________________
If your system fails just swap long & short :whistling
Reply With Quote
  #4 (permalink)  
Old 06-22-2005, 03:12 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

Quote:
So simply put I want the following:
If price>MA AND First_Trade_of_the_day = TRUE THEN buy.
Hey,

That's simple. Just add TimeDay(LastTradeTime) <> Day

If you want X seconds of interval between each trade, you can simply add CurTime - LastTradeTime => X
__________________
Make easy pips with the Advanced Economic Calendar for Forex Trading.
Reply With Quote
  #5 (permalink)  
Old 06-22-2005, 03:19 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

Hey 7,

Don't hesitate to ask a ton of questions. You can even ask a million tons of questions! But be sure you categorize it in proper forum. However, I've seen you putting all threads properly already.
__________________
Make easy pips with the Advanced Economic Calendar for Forex Trading.
Reply With Quote
  #6 (permalink)  
Old 06-23-2005, 04:54 AM
TraderSeven's Avatar
Sophomore
 
Join Date: Jun 2005
Posts: 86
Thanks: 0
Thanked 1 Time in 1 Post
TraderSeven is a glorious beacon of lightTraderSeven is a glorious beacon of lightTraderSeven is a glorious beacon of lightTraderSeven is a glorious beacon of lightTraderSeven is a glorious beacon of light
Default

I'm not so sure this question is in the right forum. It has nothing to do with ZeroCode and doesn't fit elswhere either.
---
On other platforms an MA simply plots by typing MA(some vars here)
In MT4 most people recode an MA thats hardcoded in MT4 already.
And even if the standard MA is used I see all kind of loops to plot it.
So my question is:
I want an example of the absolute minimum to plot a MA
__________________
If your system fails just swap long & short :whistling
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
Boll Squeeze with JMA for MT4 dongading Indicators 16 09-19-2007 08:30 AM
Merging orders TraderSeven MetaTrader and ZeroCode 7 12-10-2005 01:19 AM
Help with double CCI code shatteredgently MetaTrader and ZeroCode 0 06-22-2005 07:23 PM


All times are GMT. The time now is 02:38 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