Forex



Go Back   Forex Trading > Programming > MetaTrader
Forex Forum Register More recent Blogs Calendar Advertising Others Help






Register
Welcome to Forex-TSD!, one of the largest Forex forums worldwide, where you will be able to find the most complete and reliable Forex information imaginable.

From the list below, select the forum that you want to visit and register to post, as many times you want. It’s absolutely free. Click here for registering on Forex-TSD.

Exclusive Forum
The Exclusive Forum is the only paid section. Once you subscribe, you will get free access to real cutting-edge Trading Systems (automated and not), Indicators, Signals, Articles, etc., that will help and guide you, in ways that you could only imagine, with your Forex trading.
  • Elite Section
    Get access to private discussions, specialized support, indicators and trading systems reported every week.
  • Advanced Elite Section
    For professional traders, trading system developers and any other member who may need to use and/or convert, the most cutting-edge exclusive indicators and trading systems for MT4 and MT5.
See more

Reply
 
Thread Tools Display Modes
  #1391 (permalink)  
Old 10-21-2008, 06:18 PM
Member
 
Join Date: Jan 2008
Posts: 47
Pussy Galore is on a distinguished road
Identifier syntax maybe???
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
  #1392 (permalink)  
Old 10-21-2008, 07:32 PM
Member
 
Join Date: Jan 2008
Posts: 47
Pussy Galore is on a distinguished road
Have you tried without the full stop?

eg paire1 instead of paire.1

I don't know, but it's just a thought.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
  #1393 (permalink)  
Old 10-21-2008, 10:57 PM
Senior Member
 
Join Date: Nov 2006
Posts: 308
luxinterior is on a distinguished road
fungraphic

You can't have period in a variable name also you can't declare a variable within an array declaration. Take a look in the help file for more information about arrays and how to declare them.

Lux
__________________
Build An Expert Advisor. FREE E-course As Seen On TV
ForexArea.com
Users of Gap Trader from 'Forex-Assistant' MUST Read This
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
  #1394 (permalink)  
Old 10-21-2008, 11:59 PM
cockeyedcowboy's Avatar
Senior Member
 
Join Date: Nov 2005
Posts: 480
cockeyedcowboy is on a distinguished road
Quote:
Originally Posted by fungraphic View Post
Hello

PHP Code:
 
//---- input parameters
extern string paire.1="EURUSD";
extern string paire.2="GBPUSD";
extern string paire.3="USDJPY";
 
string paire [3]= {paire.1paire.2paire.3}; //error compil
string paire [3]= {string paire.1string paire.1string paire.1};//error compil
string paire [3]= {extern string paire.1="EURUSD"extern string paire.1="EURUSD"extern string paire.1="EURUSD"};//error compil
string paire [3]= {"EURUSD""GBPUSD""USDJPY"}; // no error it's good compil 



Help me please.

Where's my error?

what a mess what is it your tring to do?

You cant declear variables within array declarations you can not use the extern key word there as well, in fact you can not declare the variables twice in the same code block. But your main problem lays in the fact your useing variables to assign values to the the elements of the array that can only be done with constancts as in your last example.

as far as using the period seperator it is not documented it will work BUT because that it is undocumented I would not be supprized if MT is not reserving its use in the future, and if so, your'll have to rewrite your code at that time. not a good idear to use it if you ask me.

Keit
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
  #1395 (permalink)  
Old 10-22-2008, 03:34 AM
Junior Member
 
Join Date: Sep 2007
Posts: 6
tradertt is on a distinguished road
Can anyone help me code this? Need a Popup once a certain condition is met

Hi

I need to code an EA (is that what you call it) to alert me on a certain trade condition happening.

I would like it to be able to moniter the 15mins, 30 mins, 1h and 4h time frames

Conditions for Buy: (Sell is the direct opposite)

1) 2 Moving Averages are needed
1 of the High of all bars 10 SMA of High
1 of the Low of all bars 8 SMA of Low

2) 2 bars are TOTALLY ABOVE the SMA High, (Meaning the Low of the bar is totally above the SMA high)

3) Within the next 10 or 15 bars or 20 bars, alert me once 1 bar closes TOTALLY BELOW the SMA Low

VICE VERSA for sell

Can anyone code this for me?

Thank you
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
  #1396 (permalink)  
Old 10-22-2008, 10:00 PM
Member
 
Join Date: May 2008
Posts: 57
fireslayer26 is on a distinguished road
GBP/JPY indicator..... need programmer

I need a indicator for a trend I have found in the GBP/JPY pair. Watching a 30 minute candle stick chart, if the last candle closed up/green and the current candle moves down/red below the Low of the green candle, then it will continue to move down for a minimum of 10 pips or more (usually more), either on that candle or the next. This is also true the other way, if the previous candle closed down/red and the current candle moves up/green above the High of the red candle it will continue the same as before.

You can go back and look on the 30 minute chart to confirm this. So if anyone is interested in making this indicator, please let me know. Oh and I would like the indicator to be a Arrow showing the up or down movement.

Thanks!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
  #1397 (permalink)  
Old 10-23-2008, 05:58 PM
Junior Member
 
Join Date: Mar 2008
Posts: 1
Donbrid is on a distinguished road
Mechanical trading EA question

how would I code an EA to look at last bar's price move up or down and if this move is >= (external variable I can set) then on present bar open a same direction trade with external values for Stop loss, Trailing Stop and Take profit and make this the Only trade to be opened on the present bar...

So check to see if trading if so then no more trading till next bar even if profit or stop loss reached...
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
  #1398 (permalink)  
Old 10-24-2008, 02:57 AM
Senior Member
 
Join Date: Jan 2007
Location: not so remote
Posts: 3,272
fxbs is on a distinguished road
we need and should open thread like CopyRight and copyLeft

Quote:
Originally Posted by Linuxser View Post
Ok ok,

member has an infraction due the overdose of reports.

But we need to be pragmatic and not for the only decompiling action you're violating copyrights.

First, yes or yes, the code needs to have a patent from any patent office in the world.
Just after the code (product, logarithm, dna sequence, thing, idea, whatever) has the patent is protected for any copyright law around to world because no matter country almost all have signed the international copyrights agreements. If no patent, so sorry.

You can't claim you have copyrights over something if you're not the patent owner. That's the way the thing (and the world) works.

eg: You write a book. Do you have ISBN for that book? yes or no?. No, sorry the book writer could be anybody.



Btw, why coders that claim to be so good keeps posting ex4 files while decompilation is so easy?

If I was so good as some of them claims I would write my indicators using another tools with at least AES encryption.

A friend who is a really good coder is teaching me about how to do that. Is not hard and it works. Have you tried to decompile a Windows library?



Quote:
Originally Posted by cockeyedcowboy View Post
Linuxser

I beleive you are unclear in your above post. CopyRight and Patents are two different things. a book or any writen document has an author and the the author has a right to his writtings. A patent is on a design, operation, etc.. and that needs to be registered to be good. Copyrights on the other hand has no such requirement if the author has no intention to make public. If I were to mail you a letter, the copy of the letter is yours but the witings of the letter is still belongs to me. If you publish that letter I can have recourse against you as I did not intend to publish it. Any of my writings are considered part of my private library and are protected by copyright laws.

Dont know what your trying to say in the above post, but if the code, as this one in question, is clearly been decompiled it should be considered illegally gotten. As for posting any of my writings I consider it in line with posting my bank account numbers or even the name of any company I have accounts with. I will not do it, the only time I transfer code is in private. I have ask why you dont have a means of private rooms in this forum it was for this very issue, I am not so much concern with someone decompiling some thing for their own private and personal use, although still illegal, my main objection is the ones that do it to later profit from it by selling it to others as their work.

I was going to post my time library a while back but have not done so why? Plan and simple; The library was to good to give others, and have them sell it as their work. I am good and theres others that are better programers along with many more that have stoped posting over the years because for this very issue.

Keit
Quote:
Originally Posted by Linuxser View Post


Hi buddy. I'm just talking about the legal view. If somebody pretends to have the copyrights or patent about something is for some reason like money, public recognition, premiums, the only desire to be considered the author, so on.

If author does not have any petition about why wants to have the rights about such thing there is no sense in claim copyrights.

Legally, copyrights or patents have almost same approach, you need to have proof that you're the author. And the only way to do that is to register or to gather enough material to pretend being the original author. In both cases that proofs needs to be shown on a court to get a sentence that allows you the manger of the rights.

Without a court sentence there wouldn't have been a punitive action coming from the state which have the monopoly of public force and it's the only allow to shall justice. And justice is what the author that feels his rights has been damaged is looking for.

In that way copyleft is born. It's the opposite.

As you write: as this one in question, is clearly been decompiled it should be considered illegally gotten.

And you're fully right. Original author needs to have the proof to probe that a crime has been committed. Proofs are basis of modern legal systems and the state of rights.

Otherwise we could sentence a man for murder just because somebody claims he's a murder.

Also: If I were to mail you a letter, the copy of the letter is yours but the writings of the letter is still belongs to me.

That's depends on the contract between you and the mail provider and I and the email prvider.
If that letter was sent by hotmail the rights belongs to Microsoft

PD:
I'm very happy to have this talk besides forex, indicators, codes.

Last edited by fxbs; 10-24-2008 at 03:02 AM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
  #1399 (permalink)  
Old 10-25-2008, 07:07 PM
Junior Member
 
Join Date: Jan 2008
Posts: 17
forexarchitect is on a distinguished road
Error 138 - how to overcome requote

Hello guys
I have my EA coded with RefreshRates as per following, but I still have requote and my EA stop sending new CloseOrder after 1 or 2 try. How to I write a code that will ask my EA to keep sending CloseOrder until it accepted by the broker server? Thanks

for (int i=0; i < RepeatN; i++)
{
RefreshRates();
bool res = CloseOrder(OrderTicket(), OrderLots(), MarketInfo(OrderSymbol(), MODE_BID));
if (res) break;
}
__________________
creativity + common sense + a bit of humor = lots of pipp
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
  #1400 (permalink)  
Old 10-26-2008, 07:13 PM
Junior Member
 
Join Date: Sep 2007
Posts: 6
tradertt is on a distinguished road
Anyone can help me do the coding?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
Reply

Bookmarks

Tags
#include, candle time, CHinGsMAroonCLK, code, coders guru, conditionally, dll, eli hayun, Eur_harvester.ex4, expert adviser, expert advisor, forex, higher high, how to code, indicator, I_XO_A_H, kehedge, mechanical trading, metatrader command line, mt4, MT4-LevelStop-Reverse, OrderReliable.mqh, programming, rectangle tool, trading, volty channel stop


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
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
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 11:08 AM.



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