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
  #641 (permalink)  
Old 01-23-2008, 03:49 AM
wolfe's Avatar
Senior Member
 
Join Date: Jan 2006
Posts: 723
wolfe is on a distinguished road
Quote:
Originally Posted by omelette View Post
Something simple like this should work.
Thank you once again Omelette! You have saved me again from beating my head against the wall.

Your help has been priceless.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #642 (permalink)  
Old 01-24-2008, 12:15 PM
Junior Member
 
Join Date: Dec 2005
Posts: 15
Angler is on a distinguished road
Missing an indicator bar...

Hi guys...


Wondering if you would have any idea why when using an indicator that displays as an histogram bar...now and then it does not display a bar...even though there should be one there. It worked on previous bars as they occurred and following bars and when the indicator is put on a new chart the missing bar is shown on it...Also fixes itself if you re-compile the indicator...

the indicator is very straight forward like a momentum style indicator just counting bars ...with a calculation at the end..using ...iclose ,iopen and such.

just weird that it messes a bar...

Last edited by Angler; 01-24-2008 at 01:52 PM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #643 (permalink)  
Old 01-24-2008, 08:51 PM
Beno's Avatar
Senior Member
 
Join Date: Aug 2006
Location: London
Posts: 362
Beno is on a distinguished road
Gidday

What does this mean. I have compiled it and the only error I get is this but can't find any info on it. any help would be good.

"comparison expression expected"

Cheers Beno
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #644 (permalink)  
Old 01-24-2008, 11:29 PM
Senior Member
 
Join Date: Jan 2006
Posts: 1,119
omelette is on a distinguished road
Quote:
Originally Posted by Beno View Post
Gidday

What does this mean. I have compiled it and the only error I get is this but can't find any info on it. any help would be good.

"comparison expression expected"

Cheers Beno
You probably used '=' instead of '=='
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #645 (permalink)  
Old 01-25-2008, 12:40 PM
MrM MrM is offline
Member
 
Join Date: Jul 2007
Posts: 75
MrM is on a distinguished road
Changing values without chaging shape of an indicator

Hi,

I have the following programming problem: I have an indicator and I would like to change it so that it moves between -2 and 2. The current range is way smaller so simply putting a fixed minimum and fixed maximum in it does not work. I need to change the actual values of the indicator. Does anyone know how to do this? Help would be much appreciated..

cheers
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #646 (permalink)  
Old 01-25-2008, 01:35 PM
MrM MrM is offline
Member
 
Join Date: Jul 2007
Posts: 75
MrM is on a distinguished road
pip-based timeframe

how would you code a chart that is based on pips and not on time, but on pips: a candle closes when you've had 10 pips up or 10 pips down. So candles(/bars) are based on price and not on time.

Doesn't seem like a simple coding thing so any help would be much appreciated
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #647 (permalink)  
Old 01-25-2008, 07:26 PM
Senior Member
 
Join Date: Feb 2006
Posts: 559
Michel is on a distinguished road
Quote:
Originally Posted by MrM View Post
how would you code a chart that is based on pips and not on time, but on pips: a candle closes when you've had 10 pips up or 10 pips down. So candles(/bars) are based on price and not on time.

Doesn't seem like a simple coding thing so any help would be much appreciated
Do some search for "Renko"
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #648 (permalink)  
Old 01-25-2008, 07:41 PM
Junior Member
 
Join Date: Oct 2007
Posts: 3
lutade is on a distinguished road
Quote:
Originally Posted by MrM View Post
Hi,

I have the following programming problem: I have an indicator and I would like to change it so that it moves between -2 and 2. The current range is way smaller so simply putting a fixed minimum and fixed maximum in it does not work. I need to change the actual values of the indicator. Does anyone know how to do this? Help would be much appreciated..

cheers
old value: v0 in the range min0...max0
new value: v1 in the range min1...max1
linear transformation: (v0-min0)/(max0-min0)=(v1-min1)/(max1-min1)
=> v1=min1+(max1-min1)*(v0-min0)/(max0-min0)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #649 (permalink)  
Old 01-26-2008, 01:47 AM
Member
 
Join Date: Sep 2007
Posts: 68
Ronald Raygun is on a distinguished road
Multiple Orders

I never quite understood the concept behind multiple orders.

What I'm trying to code here is a system which open 5 separate lots, and then closes them individually as each lot reaches their respective TP.

I know it's possible, how do I do it?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #650 (permalink)  
Old 01-26-2008, 12:10 PM
MrM MrM is offline
Member
 
Join Date: Jul 2007
Posts: 75
MrM is on a distinguished road
thx!

thanks a lot for the help guys, this Renko thing is exactly what I was looking for!
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:14 PM.



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