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
  #41 (permalink)  
Old 12-25-2005, 12:54 AM
Member
 
Join Date: Dec 2005
Posts: 32
zuhainis is on a distinguished road
Quote:
Originally Posted by codersguru
zuhainis,

Try this:

PHP Code:
     double Slope iCustom(NULL,0,"JMASlope",14,0,0,0); 
parmeter 1 :the symbol - NULL for current symbol.
parmeter 2 : time frame - 0 for current time frame.
parmeter 3 : indicator name - here it's "JMASlope".
parmeter 4 : this is a setting for JMASlope - Length = 14.
parmeter 5 : this is a setting for JMASlope - Phase = 1500.
parmeter 6 : the line (buffer) number (range from 0 to 7).
parmeter 7 : the working bar - 0 for the current bar.

I didn't try it yet, so please try it and tell me what will you get?
Thank you for the quick reply.
I'm waiting for market open to test it.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #42 (permalink)  
Old 12-25-2005, 01:32 AM
keris2112's Avatar
Senior Member
 
Join Date: Dec 2005
Location: California, US
Posts: 129
keris2112 is on a distinguished road
EDIT: Well, I guess you already got a response from Codersguru, but I'll leave this in place as it may help somebody else.

EDIT 2: I think you'll need reference JMASlope as I show below, due to the way it uses 2 buffers to give you the slope. Codersguru, please let me know if this is correct as you're The Man and I'm just a humble noob trying to learn to program. BTW, thank you so much for your MT4 programming tutorials. I knew a little, but now I know a lot more.

Quote:
Originally Posted by zuhainis
Hi Codersguru,
I'm trying to get current JMASlope value using iCustom but not sure how to do it, can you please help me?

Is this correct?

double Slope = iCustom(NULL,0,"JMASlope",14,0,0);

Thank you.
double Slope = iCustom(NULL,0,"JMASlope",14,0,0);
The 0 in the above line of code sets which indicator buffer you want information from. In the code, you'll usually see them as IndexBuffers. There can be 8 buffers, from 0-7.

In the JMASlope indicator, if you look at the code, you'll notice that there are 2 indicator buffers, 0 and 1. 0 = UpBuffer and 1 = DnBuffer.

In most indicators you can choose whichever buffer holds the information that you want and just call that buffer. JMASlope is a little different, though. It uses 2 buffers to give you 1 piece of information, i.e. the slope. Buffer 0 keeps track of positive slopes, and buffer 1 keeps track of negative slopes. To get all the information into your EA you would need to reference both buffers, similar to the following:

Code:
double Slope
double SlopeUP = iCustom(NULL,0,"JMASlope",14,0,0)
double SlopeDN = iCustom(NULL,0,"JMASlope",14,1,0)
if(SlopeUP > 0) Slope = SlopeUP;
     else
     Slope = SlopeDN;
Another thing, in iCustom, the values after the indicator name, i.e. "JMASlope", and before the mode (where you choose the buffer as we did above), match the external Inputs that a user may enter on the Input tab when attaching the indicator. For JMASlope, there are two inputs, Length and Phase. So, in the above code, we've specified 14 for the length, and we left out an entry for phase, so it would use the default of 0. If you had wanted to specify a phase you would have done something like 14,2.

Well, that may be a little overkill for an answer, but I wanted you to understand how it worked. I hope all of that was understandable. Let me know if I need to clarify anything.

Keris

Last edited by keris2112; 12-25-2005 at 01:40 AM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #43 (permalink)  
Old 12-25-2005, 01:48 AM
keris2112's Avatar
Senior Member
 
Join Date: Dec 2005
Location: California, US
Posts: 129
keris2112 is on a distinguished road
Help with ICWR

Since this is the Ask thread, I'm posting this here too (I posted in the icwr thread already).

Do you think it would be possible to modify the code of the icwr indicator to leave all of the previous Active Waves showing? I want to be able to manually backtest the system and the indicator is great fro drawing the waves, but it would be nice to be able to quickly look at the chart and see all the previous waves that qualified as Active Waves. Maybe when an active wave is replaced by a new active wave, instead of turning back to blue, it could change to yellow or something.

I've tried a number of modifications to the code, but I can't seem to get any of them to work.

When you have time, I'd really appreciate your help.

Keris
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #44 (permalink)  
Old 12-25-2005, 04:12 AM
kamyar's Avatar
Senior Member
 
Join Date: Dec 2005
Location: Iran
Posts: 635
kamyar is on a distinguished road
hi coder

i am a Microsft Certified VB6 coder if you have any idea about linking MQL4 and VB6 i am very keen to help.i do not know exactly it is possible or not(i mean linking these two)but i suppose that evry thing is possible.i am ready for your suggestion(s).

Last edited by kamyar; 12-25-2005 at 04:15 AM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #45 (permalink)  
Old 12-25-2005, 06:52 AM
kamyar's Avatar
Senior Member
 
Join Date: Dec 2005
Location: Iran
Posts: 635
kamyar is on a distinguished road
strategy compiler

i want to offer you a software which is able to compile your trading strategies to MQL4 language.to install this software on your PC you should install .NetFrameWork 1.1 first.here you can find it:
http://www.microsoft.com/downloads/d...displaylang=en

Last edited by kamyar; 12-25-2005 at 06:57 AM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #46 (permalink)  
Old 12-25-2005, 06:59 AM
kamyar's Avatar
Senior Member
 
Join Date: Dec 2005
Location: Iran
Posts: 635
kamyar is on a distinguished road
hi

this software that i offered here is a compiler.i mean you can put your own strategy in it(of course in a very user friendly environment)and the software will compile your strategy to MQL4 language.this is a trial version.
Attached Files
File Type: rar gordago.rar (832.7 KB, 173 views)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #47 (permalink)  
Old 12-25-2005, 07:05 AM
kamyar's Avatar
Senior Member
 
Join Date: Dec 2005
Location: Iran
Posts: 635
kamyar is on a distinguished road
presentation

this file is a demonstration of the software.in fact it is a guideline of it.the best kind of help.enjoy!!!!!!!
Attached Files
File Type: rar GSO_prezentation.rar (671.0 KB, 155 views)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #48 (permalink)  
Old 12-25-2005, 08:01 AM
Junior Member
 
Join Date: Oct 2005
Posts: 6
Oba_Ire is on a distinguished road
Stop and Reverse trailing stop loss

Hi

I am interested in stop and reverse code.

Can you put stop and reverse code onto the sample that you gave for the lessons.

Example long EURUSD stop loss 10.

if stop loss reached then close order and open a order in the reverse OP_SELL.

If short EURUSD short stop loss 10.
if stop loss reached then close order and open a order in the reverse
OP_BUY

Thank you
Oba Ire
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #49 (permalink)  
Old 12-25-2005, 08:39 AM
jerrymar's Avatar
Member
 
Join Date: Dec 2005
Posts: 29
jerrymar is on a distinguished road
silvertrend alert

codersguru,

gud day!

what code could i add to silvertrend signal. so that everytime it signals buy or sell aside from visual signal it will also sound off or better send me an email.

thanks it would help me alot.

Merry Christmas!!!
Attached Files
File Type: mq4 SilverTrend_Signal.mq4 (2.7 KB, 84 views)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #50 (permalink)  
Old 12-25-2005, 04:31 PM
keris2112's Avatar
Senior Member
 
Join Date: Dec 2005
Location: California, US
Posts: 129
keris2112 is on a distinguished road
Quote:
Originally Posted by jerrymar
codersguru,

gud day!

what code could i add to silvertrend signal. so that everytime it signals buy or sell aside from visual signal it will also sound off or better send me an email.

thanks it would help me alot.

Merry Christmas!!!
I think this will work:

Code:
smin = SsMin+(SsMax-SsMin)*K/100; 
smax = SsMax-(SsMax-SsMin)*K/100; 
	val1[shift]=0;
	val2[shift]=0;
	if (Close[shift]<smin)
		{
		uptrend = false;
		Alert("Silvertrend DOWN signal!!!");		}
	if (Close[shift]>smax)
		{
		uptrend = true;
		Alert("Silvertrend UP signal!!!");
		}
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Bookmarks

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 On
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 09:53 PM
Forex SRDC Sidus Sibkis EA MT4 Forum OTCSmart This thread Refback 12-08-2007 11:46 AM


All times are GMT. The time now is 02:50 AM.



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