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 (1) Thread Tools Display Modes
  #821 (permalink)  
Old 04-16-2008, 06:19 AM
Member
 
Join Date: Sep 2007
Posts: 35
zamanib is on a distinguished road
buy and sell on the 100's

Quote:
Originally Posted by Big Be View Post
Zamanib,
What are all the details you look at to decide whether to buy or sell?

Big Be
ok I start on Sunday when market open example this week. then I place buy/sell orders. gbp/jpy the 1st round number i mean 100 was 199.00
so buy 0.1 @199.00 sell 0.1 @198.91(sell at this price because of the spred)
so from here i place buy/sell orders 200.00/199.91 201.00/200.91 ----205.00/204.91(the ea should buy/sell as price move to every 100 pips)
same i do for if the market go the other side 198.00/197.91--------
all order are 100 pips target no increase in lots size
so ea should place a buy/sell on every 100's pips move (better to start on the round numbers eg 199.00 200.00 198.00 etc) with target 100 pips
no stops. we have to take into consideration the spread ibfx is 9 pips on gbp/gpy. so we want to make sure once 100 pips tp is hit the same time the new buy/sell order open
I hope this make it clear
I appreciate if you can make the Ea thank you
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #822 (permalink)  
Old 04-16-2008, 11:09 AM
fxgrm's Avatar
Member
 
Join Date: Mar 2007
Posts: 91
fxgrm is on a distinguished road
How to code reverse or counter trend?

I have an EA that consistantly loses.

Is there a code that can be added that when normal buy conditions are met it will place a sell instead of buy, and a buy instead of sell? In other words do the exact opposite?


I don't know what it would be called. Maybe counter trend?

Thanks in advance
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #823 (permalink)  
Old 04-16-2008, 01:58 PM
Junior Member
 
Join Date: Feb 2008
Posts: 15
SolomonZhang is on a distinguished road
Quote:
Originally Posted by fxgrm View Post
I have an EA that consistantly loses.

Is there a code that can be added that when normal buy conditions are met it will place a sell instead of buy, and a buy instead of sell? In other words do the exact opposite?


I don't know what it would be called. Maybe counter trend?

Thanks in advance
As I know there is no code that can do that to an existing / running EA.

What you have to do is to upload the EA here as attachment in mq4 form (not ex4) so that experts here could change the buy code into sell code.

If you don't have the mq4 form then, it's pretty hard to "change" it.

Regards,
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #824 (permalink)  
Old 04-16-2008, 11:23 PM
Member
 
Join Date: Oct 2006
Posts: 71
Big Be is on a distinguished road
buy and sell on the 100's

Zamanib,
OK.
Now tell us, how and when do you close trades?
Be specific.

Big Be
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #825 (permalink)  
Old 04-17-2008, 07:37 AM
Member
 
Join Date: Sep 2007
Posts: 35
zamanib is on a distinguished road
Quote:
Originally Posted by Big Be View Post
Zamanib,
OK.
Now tell us, how and when do you close trades?
Be specific.

Big Be
sell trade and buy trade are closed 100pips . target. no stops.
I see 80% of the time market range. so we mayhave 2 cycle in aweek up/down
All I need is a simple ea to open buy sell order on evey 100pips steps and target 100pips. no stop loss no increase in lot size.

I perfer to buy/sell on the 100's round numbers. I have an Ea but it is martangle (increase lot size) and i dont have the source code to change it.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #826 (permalink)  
Old 04-17-2008, 11:48 AM
leeb's Avatar
Senior Member
 
Join Date: Dec 2005
Posts: 369
leeb is on a distinguished road
Getting account info in MT4

Hi all, Could anyone tell me how is it possible to put into code things the strategy tester shows, eg: consecutive losses, I know it is possible but forget how to code. Thanks in advance
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #827 (permalink)  
Old 04-17-2008, 04:32 PM
parmi99@gmail.com's Avatar
Junior Member
 
Join Date: Mar 2007
Posts: 2
parmi99@gmail.com is on a distinguished road
Exit strategy for Std Dev based EA

I am using slope of Standard Deviation indicator to enter a trade for example
by the expression
iStdDev(NULL, 0, 8, MODE_SMA, 0, PRICE_CLOSE, Current + 0)minus iStdDev(NULL, 0, 8, MODE_SMA, 0, PRICE_CLOSE, Current + 2)> desired slope constant
which works great for entering the trade,
But when I use the criterion of negative slope of the same,( although works fine manually)for exiting the trade.
It does not work.
The trade is immediately exited after entry.Can anybody fix that problem or suggest some solution.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #828 (permalink)  
Old 04-18-2008, 12:28 PM
european's Avatar
Senior Member
 
Join Date: Apr 2006
Posts: 284
european is on a distinguished road
MT4: Close Order on TakeProfit value

Anybody can share ideas/code on how to Close an Order at TakeProfit value.

For some reason 'TakeProfit' in OrderSend() function doesn't always work on short/sell orders in MT4, though it works well in long/buy orders.

I wrote some code comparing order's TakeProfit value with current price, but it doesnt work correctly. Any ideas?


euro

Last edited by european; 04-18-2008 at 12:41 PM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #829 (permalink)  
Old 04-18-2008, 01:48 PM
Administrator
 
Join Date: Sep 2005
Posts: 16,818
Blog Entries: 145
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
As I remember on page #49 and 50 some people are trying to fix same problem.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #830 (permalink)  
Old 04-19-2008, 08:13 PM
european's Avatar
Senior Member
 
Join Date: Apr 2006
Posts: 284
european is on a distinguished road
No,

there is no info about it on pages #49-50.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Bookmarks

Tags
candle time, CHinGsMAroonCLK, coders guru, expert advisor, forex, how to code, I_XO_A_H, mechanical trading, trading

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

LinkBacks (?)
LinkBack to this Thread: http://www.forex-tsd.com/metatrader-programming/554-how-code.html
Posted By For Type Date
Need an experienced programmer? - Page 2 Post #0 Refback 09-24-2008 07:24 AM

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to code this? iscuba11 Metatrader 4 mql 4 - Development course 1 08-03-2007 05:22 PM


All times are GMT. The time now is 12:25 PM.



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