Forex
Google
New signals service!

Go Back   Forex Trading > Metatrader Training > Metatrader 4 mql 4 - Development course > Questions


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 (2) Thread Tools Display Modes
  #541 (permalink)  
Old 03-22-2007, 03:31 AM
bigbear3391's Avatar
Senior Member
 
Join Date: Dec 2006
Location: California USA!!!
Posts: 374
bigbear3391 is on a distinguished road
A Favor TO Ask

----------

Last edited by bigbear3391; 03-30-2007 at 11:44 PM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #542 (permalink)  
Old 03-22-2007, 03:23 PM
iscuba11's Avatar
Senior Member
 
Join Date: May 2006
Location: Houston
Posts: 399
iscuba11 is on a distinguished road
Smile Need More Help Please!

PHP Code:
if(currency_decimal == 2OpenTriggerLevel DoubleToStr(OpenTriggerLevel,2); 
What I am attempting to do is have the EA automatically change the default OpenTriggerLevel from 4 decimal places to 2 when the user selects 2 (currency_decimal) from 4 in the EA setup. Such a change would have to take place on a currency like USDJPY which is 2 decimal places.

Evidently the compiler does not like the second ' = ' sign in the above statement.

With continued appreciation, Thanks in Advance for your input assistance!


Dave
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #543 (permalink)  
Old 03-22-2007, 05:55 PM
Member
 
Join Date: Dec 2005
Posts: 68
asmdev is on a distinguished road
MQL4 has predefined variable Digits which corresponds to number of decimal places of the pair.
DoubleToStr(OpenTriggerLevel, Digits);

the code is correct, look error in variable definition probably.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #544 (permalink)  
Old 03-23-2007, 03:48 PM
iscuba11's Avatar
Senior Member
 
Join Date: May 2006
Location: Houston
Posts: 399
iscuba11 is on a distinguished road
Smile

Quote:
Originally Posted by asmdev
MQL4 has predefined variable Digits which corresponds to number of decimal places of the pair.
DoubleToStr(OpenTriggerLevel, Digits);

the code is correct, look error in variable definition probably.

I tried this, but it still displays OpenTriggerLevel as .0004 versus .04:
PHP Code:
if(currency_decimal == 2DoubleToStr(OpenTriggerLevel,2); 
Still confused???
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #545 (permalink)  
Old 03-24-2007, 12:20 AM
ralph.ronnquist's Avatar
Senior Member
 
Join Date: Oct 2006
Posts: 280
ralph.ronnquist is on a distinguished road
Quote:
Originally Posted by iscuba11
PHP Code:
if(currency_decimal == 2OpenTriggerLevel DoubleToStr(OpenTriggerLevel,2); 
What I am attempting to do is have the EA automatically change the default OpenTriggerLevel from 4 decimal places to 2 when the user selects 2 (currency_decimal) from 4 in the EA setup. Such a change would have to take place on a currency like USDJPY which is 2 decimal places.

Evidently the compiler does not like the second ' = ' sign in the above statement.

With continued appreciation, Thanks in Advance for your input assistance!


Dave
The problem of that statement is that the variable 'OpenTriggerLevel' is of 'double' type, while the function returns a 'string'. So, while the code is syntactically correct, it's semantically wrong, and I would believe that's why the compiler complains.

If you want to carry the string in a variable, you'll need a variable to do so. Otherwise you can use the 'DoubleToStr' function within the 'Comment' argument to replace where it currently says 'OpenTriggerLevel'. There it could say
PHP Code:
DoubleToStrOpenTriggerLevelcurrency_decimal 
and you wouldn't need the 'if ..' statement at all.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #546 (permalink)  
Old 03-26-2007, 06:28 PM
MiniMe's Avatar
Senior Member
 
Join Date: Nov 2006
Location: Montréal
Posts: 1,297
MiniMe is on a distinguished road
Trend Indicator

This is a great indicator except it keeps changing the name on the up and down trend lines, can someone change this indicator to make the name fixed so it does not change the trend whenever the trend direction changes?



and has anyone though of making news indicator so we can add news events with time and currency pair in the code and each time there is a news we get a signal, then later use that signal to start or stop an EA ? please let me know if someone did that already ?

Regards,
Alan
Attached Files
File Type: mq4 ang_AutoCh_HL-v2.mq4 (5.5 KB, 24 views)
__________________
x.x.x.x.x. $$$ x.x.x.x.x.

Last edited by MiniMe; 03-26-2007 at 06:31 PM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #547 (permalink)  
Old 03-28-2007, 02:14 AM
Member
 
Join Date: Oct 2005
Posts: 65
tytian is on a distinguished road
anyone know how to get the total of each buy, sell, buystop, sellstop, buylimit and sellstop by the script? thanks
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #548 (permalink)  
Old 03-28-2007, 07:40 PM
MiniMe's Avatar
Senior Member
 
Join Date: Nov 2006
Location: Montréal
Posts: 1,297
MiniMe is on a distinguished road
Quote:
Originally Posted by MiniMe
This is a great indicator except it keeps changing the name on the up and down trend lines, can someone change this indicator to make the name fixed so it does not change the trend whenever the trend direction changes?



and has anyone though of making news indicator so we can add news events with time and currency pair in the code and each time there is a news we get a signal, then later use that signal to start or stop an EA ? please let me know if someone did that already ?

Regards,
Alan
Please some help here , I really want this indicator and i dont know how to change it, it keeps changing the name for the up and low channel .. i need the name to be fixed if possible ?
__________________
x.x.x.x.x. $$$ x.x.x.x.x.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #549 (permalink)  
Old 03-29-2007, 12:56 AM
ralph.ronnquist's Avatar
Senior Member
 
Join Date: Oct 2006
Posts: 280
ralph.ronnquist is on a distinguished road
Quote:
Originally Posted by MiniMe
Please some help here , I really want this indicator and i dont know how to change it, it keeps changing the name for the up and low channel .. i need the name to be fixed if possible ?
You find where it says
PHP Code:
price_p1=lap;
price_p0=lap+dhm/2;
price_p2=lap+dhm;
price_01=la0;
price_00=la0+dhm/2;
price_02=la0+dhm
and change that to say
PHP Code:
price_p2=lap;
price_p0=lap+dhm/2;
price_p1=lap+dhm;
price_02=la0;
price_00=la0+dhm/2;
price_01=la0+dhm
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #550 (permalink)  
Old 03-29-2007, 01:15 AM
islandrock's Avatar
Member
 
Join Date: Jan 2007
Posts: 87
islandrock is on a distinguished road
Question need to seperate

hi all, i've been doing some modding to the EA "10points 3". all is well EXCEPT i want to have the buy and sell run independantly. i.e. i set a max of 5 buys and 3 sell.. if one is maxed and the direction changes the aother may still open... i will not post the 10points3 EA here because it's all over this forum.. but could you at least point me in the right direction to seperating the buy/sell ?my lastest atempt almost worked but almost never cuts it!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Bookmarks

Tags
histogram, forex, ZUP_v1.mq4

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/questions/270-ask.html
Posted By For Type Date
OzFx System:) - Page 639 This thread Refback 06-21-2008 10:53 PM
Forex SRDC Sidus Sibkis EA MT4 Forum OTCSmart This thread Refback 12-08-2007 12:46 PM


All times are GMT. The time now is 06:21 AM.



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