Forex
Google
New signals service!

Go Back   Forex Trading > Programming > Metatrader Programming


Register in Forex TSD!
Trading Systems Leaders in this forum (automated trading systems) are winning more than 3000 pips in a month (30000$ investing one lot every time).
Click here to register and get more information

Reply
 
LinkBack Thread Tools Display Modes
  #171 (permalink)  
Old 08-02-2007, 09:42 AM
Member
 
Join Date: Feb 2007
Posts: 30
justize is on a distinguished road
Thank you very much for the quick reply, that helps me very much!
Thanks!!!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #172 (permalink)  
Old 08-02-2007, 03:14 PM
Member
 
Join Date: Jul 2007
Posts: 41
MQL4 is on a distinguished road
Hi,

I have some questions too. But can You please write the code and explain it to me short, with an example please?

1)If at 12:00, for example, I opened 2 orders, then I want to close the first order, not all 2 of them, at 1:00. Would someone please show me an example of this with code?

2)I paste the code,

PHP Code:
objectCreate("pbstat",StartX,StartY,"test",10,"Arial Narrow",FontColor); 
It shows me many errors. What is objecCreate?pbstat?StartX?StartY?
What should I declare as variables?

Would You please show me a simple example?

Last edited by MQL4; 08-02-2007 at 03:25 PM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #173 (permalink)  
Old 08-02-2007, 03:24 PM
HerbertH's Avatar
Member
 
Join Date: May 2006
Posts: 88
HerbertH is on a distinguished road
F1 == Help

Quote:
Originally Posted by MQL4 View Post
Hi,

I have some questions too. But can You please write the code and explain it to me short, with an example please?

1)If at 12:00, for example, I opened 2 orders, then I want to close the first order, not all 2 of them, at 1:00. Would someone please show me an example of this with code?

2)I paste the code,

PHP Code:
objectCreate("pbstat",StartX,StartY,"test",10,"Arial Narrow",FontColor); 
It show me many errorrs. What is objecCreate?pbstat?StartX?StartY?

Can Yo uplease show me an example?

Highlight the "ObjectCreate" and press F1. It will tell you everything you ever wanted to know about this, but where not afraid to ask....

The help pages will have example code for almost every syntax item.

Cheers
__________________
Better being out, wishing to be in than being in and wishing to be out.....
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #174 (permalink)  
Old 08-02-2007, 04:51 PM
Member
 
Join Date: Jul 2007
Posts: 41
MQL4 is on a distinguished road
Quote:
Originally Posted by HerbertH View Post
Highlight the "ObjectCreate" and press F1. It will tell you everything you ever wanted to know about this, but where not afraid to ask....

The help pages will have example code for almost every syntax item.

Cheers
Thank You HerbertH,

When I do that, I get HUGE font. How can I change it?

Also,
If I have a buystop, at 60.
And the price is at 50.

If the price goes to 51, I want the buystop to go to 61.
When the price goes up 1, I want the buystop to go up one.

What is the code?


Thank You,


MQL4.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #175 (permalink)  
Old 08-02-2007, 05:30 PM
Member
 
Join Date: Jul 2007
Posts: 41
MQL4 is on a distinguished road
News EA

What is the code for the following?

If price goes 1 pip up, i want the buystop to go 1 pip up. If the price goes 1 pip down, I want the buystop to go 1 pip down.

Thanks.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #176 (permalink)  
Old 08-02-2007, 05:39 PM
ryanklefas's Avatar
Senior Member
 
Join Date: Apr 2006
Location: USA
Posts: 439
ryanklefas is on a distinguished road
Quote:
Originally Posted by MQL4 View Post
What is the code for the following?

If price goes 1 pip up, i want the buystop to go 1 pip up. If the price goes 1 pip down, I want the buystop to go 1 pip down.

Thanks.
You would have to modify the the order's OrderOpenPrice() using the OrderModify() function.
__________________
"Don't work harder, work smarter." -- my Java professor

Coder for Hire:
http://www.firecell-fx.com
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #177 (permalink)  
Old 08-02-2007, 05:52 PM
HerbertH's Avatar
Member
 
Join Date: May 2006
Posts: 88
HerbertH is on a distinguished road
learning process

MQL4, this is NOT the way to learn how to code.

If you want to learn how to bake a cake (yummie..) you don't start asking someone to do it for you.
You get a recipe (in your case: the Learning how to code MQL thread) and the ingredients (F1 remember?)

Open lots of existing experts and look what's in it, how its organised and modify it as a first excercise to howto "bake your cake".

Now regarding your BUYSTOP order:
Type OrderModify, select it and press F1. Read the parts that specifically tell you about pending orders.

Good luck.
__________________
Better being out, wishing to be in than being in and wishing to be out.....
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #178 (permalink)  
Old 08-02-2007, 06:12 PM
ryanklefas's Avatar
Senior Member
 
Join Date: Apr 2006
Location: USA
Posts: 439
ryanklefas is on a distinguished road
Arrow

Quote:
Originally Posted by HerbertH View Post
MQL4, this is NOT the way to learn how to code.

If you want to learn how to bake a cake (yummie..) you don't start asking someone to do it for you.
You get a recipe (in your case: the Learning how to code MQL thread) and the ingredients (F1 remember?)

Open lots of existing experts and look what's in it, how its organised and modify it as a first excercise to howto "bake your cake".

Now regarding your BUYSTOP order:
Type OrderModify, select it and press F1. Read the parts that specifically tell you about pending orders.

Good luck.
I agree, if you're going to ask all these questions, you might as well just pay someone to program your EA for you.

Hey HerbertH.... I'm eatin' yo' baby!
__________________
"Don't work harder, work smarter." -- my Java professor

Coder for Hire:
http://www.firecell-fx.com
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #179 (permalink)  
Old 08-02-2007, 06:44 PM
Administrator
 
Join Date: Sep 2005
Posts: 16,311
Blog Entries: 106
newdigital has much to be proud ofnewdigital has much to be proud ofnewdigital has much to be proud ofnewdigital has much to be proud ofnewdigital has much to be proud ofnewdigital has much to be proud ofnewdigital has much to be proud ofnewdigital has much to be proud of
Quote:
Originally Posted by MQL4 View Post
What is the code for the following?

If price goes 1 pip up, i want the buystop to go 1 pip up. If the price goes 1 pip down, I want the buystop to go 1 pip down.

Thanks.
News EA (very advanced version) will be posted to the public on Sunday to this thread Indicators/EAs for news and trading signals (mql4 code).
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #180 (permalink)  
Old 08-02-2007, 07:32 PM
Member
 
Join Date: Jul 2007
Posts: 41
MQL4 is on a distinguished road
When,
I press F1, I get HUGE font. How can I change it?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Bookmarks

Tags
close, eas, learn mql4 video, profit, reach

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Learning Cycles For New Traders Dan7974 General Discussion 350 01-18-2008 06:04 PM
Learning to code for autotrading GoatT Metatrader Programming 8 01-10-2007 08:55 PM
Self learning expert mrtools Expert Advisors - Metatrader 4 32 10-22-2006 05:29 PM


All times are GMT. The time now is 08:34 PM.



Search Engine Friendly URLs by vBSEO 3.2.0 ©2008, Crawlability, Inc.