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
  #1031 (permalink)  
Old 06-17-2008, 12:14 PM
Junior Member
 
Join Date: Dec 2005
Posts: 11
graemenash is on a distinguished road
Above problem has been solved
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #1032 (permalink)  
Old 06-18-2008, 10:43 AM
Junior Member
 
Join Date: Jun 2007
Posts: 3
xfiles is on a distinguished road
Modification of EA

Hi,

At the moment ea : boincinPipEA_BigBear_nonlagdot uses as a main indicator : NonLagZigZag_v2 and ZigZag Pointer , and as a filter nonlagdot.

Is it posible to delate NonLagZigZag_v2 and ZigZag Pointer from source code and make nonlagdot main indicator?

Im not good in programming, any idea what to change?

Thank you for your help.
Attached Files
File Type: mq4 boincinPipEA_BigBear_nonlagdot.mq4 (7.8 KB, 6 views)
File Type: mq4 nonlagdot.mq4 (4.7 KB, 3 views)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #1033 (permalink)  
Old 06-18-2008, 11:48 AM
mladen's Avatar
Senior Member
 
Join Date: Oct 2006
Posts: 306
mladen is on a distinguished road
Thumbs up just a thought

That picture from tradestation shows an interesting thing to us complaining at Metatrader problems : basically in tradestation if you are trying to simply apply a color to a current bar it is going to work OK in all the modes (histo, point, cross, ... all the styles tradestation knows) EXCEPT line style. If you try to change the color in a line style the color change is going to lag one bar and in order to make it properly source must be changed (in the case of that picture to something like this
PHP Code:
if Value1>Value1[1then
        SetPlotColor
[1](1,Green)
else    
SetPlotColor[1](1,red); 
meaning, you have to change the color of the PREVIOUS bar
this peace of code also means that you can not change the style from line style because then the color is going to FORECAST the change and thus it will make it a classical case of repainting indicator

so every coding language has its problems, and maybe we should simply find solutions in our environment (solutions are there, all we have to do is to find them out)



Quote:
Originally Posted by graemenash View Post
Basically I'd like it to look like this:
Attached Images
File Type: gif ts lines.gif (6.7 KB, 149 views)

Last edited by mladen; 06-18-2008 at 12:05 PM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #1034 (permalink)  
Old 06-18-2008, 12:19 PM
Senior Member
 
Join Date: Nov 2006
Posts: 183
luxinterior is on a distinguished road
Quote:
Originally Posted by mladen View Post
every coding language has its problems, and maybe we should simply find solutions in our environment (solutions are there, all we have to do is to find them out)
Nice comment! Totally agree.

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!
Reply With Quote
  #1035 (permalink)  
Old 06-20-2008, 09:23 AM
Junior Member
 
Join Date: Jun 2008
Posts: 9
panteraschoice is on a distinguished road
close all after certain % profit

hi,

I want to close all trades if % gain is achieved on a weekly base.
So I need to know the accountbalance sundayevening 24.00 - no problem.
I need to know equity on sundayevening 24.00 - no problem.
But how do I store these? And how to let the ea read these values, for if there is a powerbreakdown the ea will have to start again and have to read the values from the stored place.
I know how to do this in VB, but how do I do this in mql?
I would be gratefull if someone can point that out.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #1036 (permalink)  
Old 06-20-2008, 10:04 AM
Senior Member
 
Join Date: Nov 2006
Posts: 183
luxinterior is on a distinguished road
Write them to a file. Take a look in the help files and you'll figure it out.

Good luck.

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!
Reply With Quote
  #1037 (permalink)  
Old 06-21-2008, 04:13 AM
darkkiller's Avatar
Senior Member
 
Join Date: Jul 2007
Location: Malaysia
Posts: 206
darkkiller is on a distinguished road
Price label and text

Hi
can somebody guide/teach me how to put Price label and Text properly.I already search and found this

Putting an object anchored on the right side of the screen

Code:
      if(ObjectFind("P label") != 0)
      {
      ObjectCreate("P label", OBJ_TEXT, 0, Time[0], Close[0]);
      ObjectSetText("P label", "Price", 10, "Arial", Red);
      }
      else
      {
      ObjectMove("P label", 0, Time[0], Close[0]);
      }
Code:
ObjectCreate("Trade", OBJ_LABEL, 0, 0, 0);
   ObjectSetText("Trade", "n", 40, "Wingdings", Red);
   ObjectSet("Trade", OBJPROP_CORNER, 1);
   ObjectSet("Trade", OBJPROP_XDISTANCE, 30);
   ObjectSet("Trade", OBJPROP_YDISTANCE, 30);
But still do not know how to apply.I attach together this indicator for my study in coding

Example like picture below,this is what i want,thanks!!
Attached Images
File Type: gif teach.gif (11.4 KB, 113 views)
Attached Files
File Type: mq4 Pivot_only_H4.mq4 (2.4 KB, 3 views)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #1038 (permalink)  
Old 06-21-2008, 12:12 PM
darkkiller's Avatar
Senior Member
 
Join Date: Jul 2007
Location: Malaysia
Posts: 206
darkkiller is on a distinguished road
ops,i already found the source code.Got it from here
Waddah Attar Dayly CAMERILLA - MQL4 Code Base
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #1039 (permalink)  
Old 06-26-2008, 07:16 PM
Member
 
Join Date: Jan 2006
Posts: 30
DooMGuarD is on a distinguished road
hi all...

how to calculate the maximum volume for open a order whit my money...

sample

i have USD$1000 and 100:1 and nolimit for volume in open order...

i need to know

1) maximum lots for open order in EURUSD with this money
2) maximum lots for open order in USDCHF with this money
2) maximum lots for open order in GBPCAD with this money

if you have a code, itīs better...

thanks for your help
__________________
Charles Adriano
---------------------------
sorry, sorry, sorry for my English...
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #1040 (permalink)  
Old 06-26-2008, 10:59 PM
nondisclosure007's Avatar
Senior Member
 
Join Date: Apr 2007
Posts: 100
nondisclosure007 is on a distinguished road
Code:
varlot=NormalizeDouble((AccountFreeMargin()*(varRiskPerc/100))*AccountLeverage()/MarketInfo(Symbol(),MODE_LOTSIZE),2);
where varRiskPerc is the % you want to put on your trade. ie 2%, then varRiskPerc would be 2. varRiskPerc MUST be a double or the formula will always return 0.

Quote:
Originally Posted by DooMGuarD View Post
hi all...

how to calculate the maximum volume for open a order whit my money...

sample

i have USD$1000 and 100:1 and nolimit for volume in open order...

i need to know

1) maximum lots for open order in EURUSD with this money
2) maximum lots for open order in USDCHF with this money
2) maximum lots for open order in GBPCAD with this money

if you have a code, itīs better...

thanks for your help
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Bookmarks

Tags
CHinGsMAroonCLK, I_XO_A_H

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 06: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 04:22 PM


All times are GMT. The time now is 01:33 PM.



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