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
  #841 (permalink)  
Old 04-21-2008, 03:52 PM
boostrade's Avatar
Member
 
Join Date: Dec 2006
Posts: 43
boostrade is on a distinguished road
Quote:
Originally Posted by newdigital View Post
Look at this thread about Frank EA Buy/sell EA
I think it is what you need or you can use it as an example.
Hello, it's not exactly what I want.
In my trading at support and resistence, for example, I think USD/JPY support at 103, so I opened buy at 103.20, and Sl at 103, for a tight 20pips SL. Now when SL is hit and price go back to 103.20, I'll open buy again with more lots. And if SL gets hit the 2nd time and price go back to 103.20 again, I'll buy again with more lots
Now what I do manually now is whenever Sl gets hit, I place a buy order at 103.20. but I have to monitor the price to see if SL hit or not, it's tedious.
So I want to program an EA that can do the work for me. The basic logic is:
Whenever SL is hit, it opens a buy stop/sell stop order with more lots. I'm not sure if this is possible or not. I tried to code, but cannot figure out the code for example: if SL 103.00 hit for the first time, open stop buy order 103.20, lots*2; if SL 103.00 hit for 2nd time, open stop buy order 103.20, lots*3, and so on...
Wonder if got such code or any advice. Thanks!
__________________
Enjoy trading. Have a goal, make it happen.
http://boostrade.spaces.live.com
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #842 (permalink)  
Old 04-22-2008, 12:57 AM
fxcope's Avatar
Junior Member
 
Join Date: Feb 2008
Posts: 7
fxcope is on a distinguished road
Can some one program this

I need some one to help me write an Automated Robot EA for a very this simple EA/indicator. I want to take this Indicator to the next level. I need some special things done. Buy Stop, Sell Stop, to automatically be placed at trade start time. Close opposite upon open. Adjustable TP and SL setting. Optional Trailing stop settings. And a variable for no trading based on pip range of box. I.E. if box is >60 pips = no trade. I need to be able to adjust all variables.
For the one that helps me will get my highly coveted money management. system. And the setting optimized for a currency. Or maybe work a deal. I just ask that you don't make this programing public till you talk to me.

Please PM me before you start. I would like to discuss it with you first.

May the PIPs be with us all
Attached Files
File Type: ex4 BreakOut-EAGLE_indicator.ex4 (11.1 KB, 6 views)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #843 (permalink)  
Old 04-23-2008, 01:33 PM
Junior Member
 
Join Date: Feb 2008
Posts: 3
jwpdad is on a distinguished road
EA not taking some trades on live account

I have written an EA and have been using it on a NorthFinance demo account, it is taking trades correctly on the demo and has been for several weeks. I am trying to use this EA in my live mini account with IBFX (micro lots 0.01). It takes some trades correctly, but has missed taking several other trades that it should have taken. These trades were taken correctly on the demo account. There should have been no issues with slippage, etc., as it was not at a highly volatile time and the EA allows slippage up to 5 pips, and I can think of no other reason these trades should not have executed. There are no journal errors or anything like that, it is just not trying to take the trades. I understand that there can be differences between platforms, etc., I can assure you that is not the problem here, the conditions were absolutely correct for the trades to execute but they did not. I am using extremely small lot sizes just to see how it performs live. So far, not so good, but this is the first attempt to trade live with it, other than that I had attached it briefly previously just to make sure it would execute trades and it did so. If it didn't work at all I would understand that, but I don't understand why it takes some trades correctly and not others. I am very much a novice at all of this, so any help is greatly appreciated.

Is there anything I need to do to specify use with a mini or micro account?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #844 (permalink)  
Old 04-24-2008, 12:48 AM
PipScorer's Avatar
Junior Member
 
Join Date: May 2007
Location: New York City, NY
Posts: 19
PipScorer is on a distinguished road
Quote:
Originally Posted by fxcope View Post
I need some one to help me write an Automated Robot EA for a very this simple EA/indicator. I want to take this Indicator to the next level. I need some special things done. Buy Stop, Sell Stop, to automatically be placed at trade start time. Close opposite upon open. Adjustable TP and SL setting. Optional Trailing stop settings. And a variable for no trading based on pip range of box. I.E. if box is >60 pips = no trade. I need to be able to adjust all variables.
For the one that helps me will get my highly coveted money management. system. And the setting optimized for a currency. Or maybe work a deal. I just ask that you don't make this programing public till you talk to me.

Please PM me before you start. I would like to discuss it with you first.

May the PIPs be with us all
Your attached file is .ex4. No one can see the code. If they cant see, how can we help you???
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #845 (permalink)  
Old 04-24-2008, 01:00 AM
PipScorer's Avatar
Junior Member
 
Join Date: May 2007
Location: New York City, NY
Posts: 19
PipScorer 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
Open the code, Change the OP_BUY to OP_SELL in the OrderSend...
line..change also the Bid to Ask or Ask to Bid in the same line. or vice versa.
Hope this helps.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #846 (permalink)  
Old 04-24-2008, 01:01 AM
cockeyedcowboy's Avatar
Senior Member
 
Join Date: Nov 2005
Posts: 267
cockeyedcowboy is on a distinguished road
Quote:
Originally Posted by fxcope View Post
I need some one to help me write an Automated Robot EA for a very this simple EA/indicator. I want to take this Indicator to the next level. I need some special things done. Buy Stop, Sell Stop, to automatically be placed at trade start time. Close opposite upon open. Adjustable TP and SL setting. Optional Trailing stop settings. And a variable for no trading based on pip range of box. I.E. if box is >60 pips = no trade. I need to be able to adjust all variables.
For the one that helps me will get my highly coveted money management. system. And the setting optimized for a currency. Or maybe work a deal. I just ask that you don't make this programing public till you talk to me.

Please PM me before you start. I would like to discuss it with you first.

May the PIPs be with us all



Something similar to it.
Attached Images
File Type: jpg Something similar.jpg (45.7 KB, 100 views)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #847 (permalink)  
Old 04-24-2008, 02:43 AM
Junior Member
 
Join Date: Jan 2007
Posts: 16
smiley486 is on a distinguished road
Hi,

Please pm me for any coding requests for any platform.

Paul
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #848 (permalink)  
Old 04-25-2008, 01:49 AM
sandfromsky's Avatar
Junior Member
 
Join Date: Feb 2007
Posts: 13
sandfromsky is on a distinguished road
How to call a script? like "Close" which one build in MT4



I want call a script when tow MA lines crossed, this script will execute a .exe file.

I ready for the script, but don't know how to call it in my custom instrator. (I don't means drag it from navigator panel, I want call it by code)


thanks, wish every body a happy weekend.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #849 (permalink)  
Old 04-25-2008, 05:30 AM
Senior Member
 
Join Date: Feb 2006
Posts: 513
Michel is on a distinguished road
Quote:
Originally Posted by sandfromsky View Post


I want call a script when tow MA lines crossed, this script will execute a .exe file.

I ready for the script, but don't know how to call it in my custom instrator. (I don't means drag it from navigator panel, I want call it by code)


thanks, wish every body a happy weekend.
I dont know your purpose, but I think you have to implement your script as a a librairy (.mqh) and "include" it in your EA. But maybe the most simple is just to copy your script as a function in your EA.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #850 (permalink)  
Old 04-25-2008, 11:56 AM
sandfromsky's Avatar
Junior Member
 
Join Date: Feb 2007
Posts: 13
sandfromsky is on a distinguished road
Quote:
Originally Posted by Michel View Post
I dont know your purpose, but I think you have to implement your script as a a librairy (.mqh) and "include" it in your EA. But maybe the most simple is just to copy your script as a function in your EA.


bool SendFTP( string filename, string ftp_path=NULL)
Sends the file to the FTP server set in the Tools->Options->Publisher tab. If the attempt fails, it retuns FALSE.
The function does not operate in the testing mode. This function cannot be called from custom indicators, either.



When SendFTP in custom indicators, it's can't work, but can in scripts.

I tried your method, put my function into a .mph file, and save it into experts\include, it result error No. 4055.



TestFTPInc.mqh

int FTPTest()
{
SendFTP("shots\\" + Symbol() + "_5m_live.gif", NULL);
Alert(GetLastError());
return(0);
}

In my custom indicators, I call it like

if (IsNewBar())
{
WindowScreenShot("shots\\" + Symbol() + "_5m_live.gif", 640, 480);
FTPTest();
}

it result error No. 4055.

Thanks a lot. Have a happy weekend.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Bookmarks

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 On
Forum Jump

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


All times are GMT. The time now is 01:38 PM.



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