Forex
Google

Go Back   Forex Trading > Programming > Metatrader Programming
Forex Forum Register FAQ Members List Calendar Search Today's Posts Mark Forums Read


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
  #381 (permalink)  
Old 10-04-2007, 05:20 AM
ralph.ronnquist's Avatar
ralph.ronnquist ralph.ronnquist is offline
Senior Member
 
Join Date: Oct 2006
Posts: 280
ralph.ronnquist is on a distinguished road
In principle you would only need to change the string "EURCHF" to be "EURUSD". I.e., to work with long "EURUSD" versus short "EURUSD".
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #382 (permalink)  
Old 10-04-2007, 05:27 AM
mish mish is offline
Junior Member
 
Join Date: Aug 2007
Posts: 8
mish is on a distinguished road
I've tried that

Thanks for your reply but I have tried to no avail. The code you provided has taught me and my girlfriend much about how little we know about programming!

Thankyou very much!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #383 (permalink)  
Old 10-04-2007, 05:58 AM
ralph.ronnquist's Avatar
ralph.ronnquist ralph.ronnquist is offline
Senior Member
 
Join Date: Oct 2006
Posts: 280
ralph.ronnquist is on a distinguished road
Hmm. The only "badness" I can see upfront is the test "v == cut", which compares two double numbers for equality. Perhaps it works better to only look at the full $ amounts, and thus change "euprofit", "ecprofit", "cut" and "v" to be of "int" type?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #384 (permalink)  
Old 10-04-2007, 08:57 AM
NTrader NTrader is offline
Junior Member
 
Join Date: Oct 2007
Posts: 20
NTrader is on a distinguished road
Quote:
Originally Posted by NTrader View Post
Trivial question: I'm writing a new Personal Indicator for the first time. I can't view my logs that I make with the command Print("...") in the start{} method. Where I can view them on MetaTrader 4?
Ok, I use Comment() command..
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #385 (permalink)  
Old 10-04-2007, 08:57 AM
spiritbreezer spiritbreezer is offline
Senior Member
 
Join Date: May 2006
Posts: 169
spiritbreezer is on a distinguished road
Dumbo here

Hi all

This is a great thread for someone like me who knows nothing about programming. It has much useful information and many little peices of code I could copy and play with.

I hope someone could help me out with this peice.I want to make an EA based on price. What do I enter in the code to tell the following:

1) I want the EA to look at price at 20:00 on the hour chart and see what it's relation is to the 100sma.

2)If price is above the 100sma, I want it to open 2 buy orders at certain level.

3) These levels are based on the closing price of the 16:00 candle, so if the 16:00 candle is 1.2000, I want it to open a buy at 1.1120 and 1.2080

I have the stops and trailing stops and profit levels all worked out and stuff, all codes taken from this thred. So I thank those who posted them. I

I will be forever debted if someone could help me out here.
Kind regards
Susan
__________________
The more I look; the more I operate
The more I pull out; the more I put back
The more I more;
The better I trade
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #386 (permalink)  
Old 10-04-2007, 09:12 AM
Sendra Sendra is offline
Junior Member
 
Join Date: Sep 2007
Posts: 23
Sendra is on a distinguished road
Help

Hi, everyone

I tried to create an EA, and I got the following error message:

'\end_of_program' - ending bracket '}' expected C:\...\My_First_EA.mq4(96,1)

I double-clicked it, get to the line, then check it with opening-ending brackets prior to it, and still don't know where I made mistake.

This is the second EA I tried, with the same error message, based on the same indicator.

Thank you.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #387 (permalink)  
Old 10-05-2007, 08:15 AM
wuzuwang wuzuwang is offline
Junior Member
 
Join Date: Oct 2007
Location: china
Posts: 4
wuzuwang is on a distinguished road
Help!

hello to everybody!

could someone tell me how to creat a condition like:

.......
while(when the price of GBP/USD>2.0000)

{.......}

.......

THANKS A LOTS!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #388 (permalink)  
Old 10-05-2007, 09:14 AM
newdigital newdigital is online now
Administrator
 
Join Date: Sep 2005
Posts: 15,432
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
It is something with iOpen, iClose and so on.

For example:

1.
Code:
iOpen(NULL,5,1)
It is open price for previous bar, M5 timeframe. Current symbol (pair on the chart.

2.
Code:
iClose("GBPUSD",PERIOD_H1,1)
It is close price for the previous bar (1), H1 timeframe (PERIOD_H1), for GBPUSD.

3.
Code:
iClose("GBPUSD",Pt,pr)
and in the setting:
Code:
extern int pr=1;
extern int Pt=5;
It is close price for GBPUSD for pr bar (selectable in the settings) for Pt timeframe (selectable in the selling. Default is previous bar (pr=1) and default is M5 timeframe (Pt=5) in the settings.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #389 (permalink)  
Old 10-05-2007, 12:25 PM
wuzuwang wuzuwang is offline
Junior Member
 
Join Date: Oct 2007
Location: china
Posts: 4
wuzuwang is on a distinguished road
Smile

Thanks a lot!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #390 (permalink)  
Old 10-05-2007, 12:29 PM
wuzuwang wuzuwang is offline
Junior Member
 
Join Date: Oct 2007
Location: china
Posts: 4
wuzuwang is on a distinguished road
Smile thanks

thanks a lot!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


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

vB 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 08:09 AM.