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
  #61 (permalink)  
Old 02-01-2007, 02:36 PM
Member
 
Join Date: Dec 2006
Posts: 76
dwmcqueen is on a distinguished road
Code executing only at periodicity

The following code only seems to issue a trade at the periodicity
interval. BuyCond1 && BuyCond2 triggers a buy. Anyone know why?

extern double RSIBuyLevel = 50;

FMA1 = iMA(Symbol(),TimeFrame,FastMAPeriod,0,MODE_EMA,PRI CE_CLOSE,0);
SMA1 = iMA(Symbol(),TimeFrame,SlowMAPeriod,0,MODE_SMA,PRI CE_CLOSE,0);
RSI1 = iRSI(Symbol(),TimeFrame,RSIPeriod,PRICE_CLOSE,0);

BuyCond1=FMA1 > SMA1;
BuyCond2= RSI1 > RSIBuyLevel;
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #62 (permalink)  
Old 02-01-2007, 02:45 PM
Member
 
Join Date: Dec 2006
Posts: 76
dwmcqueen is on a distinguished road
Array of values to a function (external)

Suppose I want to pass an array of values to an external function (say to use an external technical library). Is there an easy way to say "pass last 60 close bars to function A"? And what would the code look like on the dll to accept the array?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #63 (permalink)  
Old 02-03-2007, 04:39 AM
C.E.O.'s Avatar
Member
 
Join Date: Nov 2006
Posts: 90
C.E.O. is on a distinguished road
ObjectCreate

PHP Code:
ObjectCreate(TLine1OBJ_TREND0Time[25], BidTime[0], Ask); 
Need Bid to be myvariable and Ask myothervariable

Just cant get it, believe me Ive tried
I know I have to define myvariables but everything I have tried failed
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #64 (permalink)  
Old 02-04-2007, 10:47 AM
Senior Member
 
Join Date: Jan 2007
Location: not so remote
Posts: 1,814
fxbs is on a distinguished road
Dear Experts Advisers! please advise on this:

Dear Experts Advisors!
Please, stupid simple question: How to change indicator's layers on the chart and in separate windows (bring it from bottom to the front) and sequence of indicators frames (bottom to the top)?
Is it del &paste the only method, no easy hacks?

Last edited by fxbs; 02-04-2007 at 10:50 AM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #65 (permalink)  
Old 02-04-2007, 03:10 PM
Junior Member
 
Join Date: Jan 2007
Posts: 26
echnaton is on a distinguished road
hello,

thank you to all that had answer me.

Now I have learn C/C++ with a german book and I hope to learn MQL4 will no longer be so difficult.

kinds regards
echi
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #66 (permalink)  
Old 02-11-2007, 09:21 PM
Member
 
Join Date: Oct 2006
Posts: 33
Kaper is on a distinguished road
Need a little help to add code to EA.

I was wondering if somone that knows how to code EA's add some code to an existing EA. The EA is the MACD Sample that comes with the metatrader platform. Presently, it does not have a stoploss or money management aspect so I can risk a percentage of my equity/balance. I would like to add these. I am no programmer and I have tried several times to add these but get errors I cannot fix. This is probably very simple for someone that knows MQL. Any help would be appreciated. Thanks in advance.

Kevin
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #67 (permalink)  
Old 02-19-2007, 12:24 AM
Kurka Fund's Avatar
Senior Member
 
Join Date: Sep 2006
Location: San Diego
Posts: 139
Kurka Fund is on a distinguished road
Function For everyone....

Here are a few functions that once created can help everyone. Just need someone to code them....

Take a look at the attached pictures.

The goals are to

1. Enter your position at the best possible location on the bar. This should help everyone squeeze a few more pips out of every trade. Uses a timer or countdown.

2. Is a 2 tiered trailing stop that manages multipl orders. Would work good for protecting profit in margintale systems.

3. Is just nessacary for calculating indicators. Meaning that a big problem with indicators that calculate from previous data is that time is not considered. the plan is to start the indicator at a certian time rather than a specifice number of periods back.

Just pics and ideas but thats how it all starts.

Thanks for your help in advance.

K
Attached Images
File Type: jpg trade this bar.JPG (100.1 KB, 172 views)
File Type: jpg start indicator calc.JPG (48.3 KB, 141 views)
File Type: jpg envelope stop.JPG (68.8 KB, 135 views)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #68 (permalink)  
Old 02-22-2007, 01:20 AM
Senior Member
 
Join Date: Nov 2006
Posts: 122
Yoda_Glenn is on a distinguished road
EAs with tight stop losses

Can someone recommend some good EAs that work with stop losses of 30 pips or less? Thanks.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #69 (permalink)  
Old 03-02-2007, 12:56 PM
Junior Member
 
Join Date: Sep 2006
Posts: 1
revowe is on a distinguished road
is this misleading common?

MetaTrader 4.00 build 202
when pointing on bar with mouse - cant be sure about the data.
Attached Images
File Type: jpg same_bar.jpg (143.2 KB, 114 views)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #70 (permalink)  
Old 03-06-2007, 03:22 AM
MiniMe's Avatar
Senior Member
 
Join Date: Nov 2006
Location: Montréal
Posts: 1,083
MiniMe is on a distinguished road
Question MT4 One order cancel the other ?

Is there is a way to place two future order in MT4 one cancel the other ?
it would really be good ?

1- if it was buy sell order
2- if it was two buy orders or two sell order which ever executed first will cancel the other one.

anyone have an idea bout it pls let me know.
__________________
Risk comes from not knowing what you're doing
Be fearful when others are greedy and greedy when others are fearfulWarren Buffett

Last edited by MiniMe; 05-17-2007 at 06:37 AM.
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
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:26 AM.



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