#11 (permalink)  
Old 10-10-2006, 02:55 AM
gazuz's Avatar
Senior Trader and Moderat
 
Join Date: Aug 2004
Posts: 768
Thanks: 1
Thanked 8 Times in 5 Posts
gazuz is a name known to allgazuz is a name known to allgazuz is a name known to allgazuz is a name known to allgazuz is a name known to allgazuz is a name known to all
Default

how do I integrate this into an expert? I'm trying to use it for the DLM instead of using the normal S&R
__________________
____________________________\¦/
___________________________(ò ó)
______________________o0o___(_)___o0o__
___¦_____¦_____¦_____¦_____¦_____¦_____¦
¦_____¦_____¦_____¦_____¦_____¦_____¦__
___¦_____¦_____¦_____¦_____¦_____¦_____¦
¦_____¦_____¦_____¦_____¦_____¦_____¦__
Reply With Quote
  #12 (permalink)  
Old 10-10-2006, 03:15 AM
scorpion's Avatar
Administrator
 
Join Date: Aug 2004
Posts: 1,976
Thanks: 119
Thanked 383 Times in 152 Posts
scorpion is a splendid one to beholdscorpion is a splendid one to beholdscorpion is a splendid one to beholdscorpion is a splendid one to beholdscorpion is a splendid one to beholdscorpion is a splendid one to beholdscorpion is a splendid one to beholdscorpion is a splendid one to behold
Send a message via MSN to scorpion Send a message via Yahoo to scorpion
Default

Gaz, you can get current bar value:

double r0 = iCustom(Symbol(), Period(), "SuperSR7", SR_Step, SR_Precision, SR_Shift, 300, 0, 0);
double s0 = iCustom(Symbol(), Period(), "SuperSR7", SR_Step, SR_Precision, SR_Shift, 300, 1, 0);

r0 is current resistance, and s0 is current support

To get previous bar:

double r1 = iCustom(Symbol(), Period(), "SuperSR7", SR_Step, SR_Precision, SR_Shift, 300, 0, 1);
double s1 = iCustom(Symbol(), Period(), "SuperSR7", SR_Step, SR_Precision, SR_Shift, 300, 1, 1);

r1 is previous resistance and s1 is previous support.
__________________
Make easy pips with the Advanced Economic Calendar for Forex Trading.
Reply With Quote
The following users have thanked scorpion for useful post above:
  #13 (permalink)  
Old 10-10-2006, 05:57 AM
gazuz's Avatar
Senior Trader and Moderat
 
Join Date: Aug 2004
Posts: 768
Thanks: 1
Thanked 8 Times in 5 Posts
gazuz is a name known to allgazuz is a name known to allgazuz is a name known to allgazuz is a name known to allgazuz is a name known to allgazuz is a name known to all
Default

Thanks, I'll check it out sometime soon (maybe this weekend). Hopefully this will help as I know the only reason DLM is failing with S&R is because of its consistent change and false signals
__________________
____________________________\¦/
___________________________(ò ó)
______________________o0o___(_)___o0o__
___¦_____¦_____¦_____¦_____¦_____¦_____¦
¦_____¦_____¦_____¦_____¦_____¦_____¦__
___¦_____¦_____¦_____¦_____¦_____¦_____¦
¦_____¦_____¦_____¦_____¦_____¦_____¦__
Reply With Quote
  #14 (permalink)  
Old 10-21-2006, 08:34 PM
gazuz's Avatar
Senior Trader and Moderat
 
Join Date: Aug 2004
Posts: 768
Thanks: 1
Thanked 8 Times in 5 Posts
gazuz is a name known to allgazuz is a name known to allgazuz is a name known to allgazuz is a name known to allgazuz is a name known to allgazuz is a name known to all
Default

Scorpion, I put the code in there but when I hit compile it didnt recognize the parts SR_Step, SR_Precision, SR_Shift so it didnt want to compile, but if I remove them it wont work...


Any suggestions?

Here is the original part of the code to modify:

Code:
int OpenOrdersBasedOnSupRes() { int myOrderType=3; double iTmpR=0, iTmpS=0; iTmpR = iCustom(Symbol(),0,"Support and Resistance",0,0); iTmpS = iCustom(Symbol(),0,"Support and Resistance",1,0); if (Close[0]==iTmpS) { myOrderType = 1; } if (Close[0]==iTmpR) { myOrderType = 2; } return(myOrderType); }
and here is with the change:

Code:
int OpenOrdersBasedOnSupRes() { int myOrderType=3; double iTmpR=0, iTmpS=0; iTmpR = iCustom(Symbol(),Period(),"SuperSR7",SR_Step,SR_Precision,SR_Shift,300,0,0); iTmpS = iCustom(Symbol(),Period(),"SuperSR7",SR_Step,SR_Precision,SR_Shift,300,1,0); if (Close[0]==iTmpS) { myOrderType = 1; } if (Close[0]==iTmpR) { myOrderType = 2; } return(myOrderType); }
NOTE: I tried with both spaces and no spaces between the commas but it didn't change anything. I also put the indicator under experts/indicators and loaded it on the platform

I attached the full expert at the bottom of this un-modified
Attached Files
File Type: mq4 DLMv1.1.mq4 (12.2 KB, 326 views)
Sponsored Links Shark EA Ultimate
Actual Profits on Live Account: +1064%
Since Jan 2007. View Live Statements.
__________________
____________________________\¦/
___________________________(ò ó)
______________________o0o___(_)___o0o__
___¦_____¦_____¦_____¦_____¦_____¦_____¦
¦_____¦_____¦_____¦_____¦_____¦_____¦__
___¦_____¦_____¦_____¦_____¦_____¦_____¦
¦_____¦_____¦_____¦_____¦_____¦_____¦__

Last edited by gazuz : 10-21-2006 at 08:37 PM.
Reply With Quote
  #15 (permalink)  
Old 10-22-2006, 12:30 AM
scorpion's Avatar
Administrator
 
Join Date: Aug 2004
Posts: 1,976
Thanks: 119
Thanked 383 Times in 152 Posts
scorpion is a splendid one to beholdscorpion is a splendid one to beholdscorpion is a splendid one to beholdscorpion is a splendid one to beholdscorpion is a splendid one to beholdscorpion is a splendid one to beholdscorpion is a splendid one to beholdscorpion is a splendid one to behold
Send a message via MSN to scorpion Send a message via Yahoo to scorpion
Default

That's because you didn't declare the global variables. Ok, copy below code and paste on the top with other variables.

extern int SR_Step=150;
extern int SR_Precision=10;
extern int SR_Shift=1;

You can then configure these variables in Expert Settings window.
__________________
Make easy pips with the Advanced Economic Calendar for Forex Trading.
Reply With Quote
  #16 (permalink)  
Old 10-22-2006, 09:01 PM
gazuz's Avatar
Senior Trader and Moderat
 
Join Date: Aug 2004
Posts: 768
Thanks: 1
Thanked 8 Times in 5 Posts
gazuz is a name known to allgazuz is a name known to allgazuz is a name known to allgazuz is a name known to allgazuz is a name known to allgazuz is a name known to all
Default

Alright I have one last question with the code

it says
Code:
if (Close[0]==iTmpS) { myOrderType = 1; } if (Close[0]==iTmpR) { myOrderType = 2; }
my goal is to make it so I can set how many pips over the resistance and under the support. it doesnt have to be a variable but I am getting too many false alerts and trades because of the price bouncing off of it. Whats the correct manner to approac this? iTmpR+2 or something if i want to make it 2 pips?

Please let me know whenever you have time
__________________
____________________________\¦/
___________________________(ò ó)
______________________o0o___(_)___o0o__
___¦_____¦_____¦_____¦_____¦_____¦_____¦
¦_____¦_____¦_____¦_____¦_____¦_____¦__
___¦_____¦_____¦_____¦_____¦_____¦_____¦
¦_____¦_____¦_____¦_____¦_____¦_____¦__
Reply With Quote
  #17 (permalink)  
Old 10-23-2006, 12:57 AM
scorpion's Avatar
Administrator
 
Join Date: Aug 2004
Posts: 1,976
Thanks: 119
Thanked 383 Times in 152 Posts
scorpion is a splendid one to beholdscorpion is a splendid one to beholdscorpion is a splendid one to beholdscorpion is a splendid one to beholdscorpion is a splendid one to beholdscorpion is a splendid one to beholdscorpion is a splendid one to beholdscorpion is a splendid one to behold
Send a message via MSN to scorpion Send a message via Yahoo to scorpion
Default

Maybe like this:

if (Close[0] > iTmpS + (Extra_Pips*Point)) { myOrderType = 1; }
if (Close[0] < iTmpR - (Extra_Pips*Point)) { myOrderType = 2; }

Then add the variable on the top:

extern int Extra_Pips = 2;

Hope this helps
__________________
Make easy pips with the Advanced Economic Calendar for Forex Trading.
Reply With Quote
  #18 (permalink)  
Old 10-23-2006, 04:41 PM
gazuz's Avatar
Senior Trader and Moderat
 
Join Date: Aug 2004
Posts: 768
Thanks: 1
Thanked 8 Times in 5 Posts
gazuz is a name known to allgazuz is a name known to allgazuz is a name known to allgazuz is a name known to allgazuz is a name known to allgazuz is a name known to all
Default

Well that turns it into a scalper which I actually don't mind at all. I know how to make it into the + and - pips though is to change the > and the < into just equal signs. Now whenever the price is over the resistance it keeps buying and whenever under it keeps selling until the price goes back between the support and resistance
__________________
____________________________\¦/
___________________________(ò ó)
______________________o0o___(_)___o0o__
___¦_____¦_____¦_____¦_____¦_____¦_____¦
¦_____¦_____¦_____¦_____¦_____¦_____¦__
___¦_____¦_____¦_____¦_____¦_____¦_____¦
¦_____¦_____¦_____¦_____¦_____¦_____¦__
Reply With Quote
  #19 (permalink)  
Old 10-24-2006, 02:44 AM
scorpion's Avatar
Administrator
 
Join Date: Aug 2004
Posts: 1,976
Thanks: 119
Thanked 383 Times in 152 Posts
scorpion is a splendid one to beholdscorpion is a splendid one to beholdscorpion is a splendid one to beholdscorpion is a splendid one to beholdscorpion is a splendid one to beholdscorpion is a splendid one to beholdscorpion is a splendid one to beholdscorpion is a splendid one to behold
Send a message via MSN to scorpion Send a message via Yahoo to scorpion
Default

So you mean there're multiple positions? If so, it's because the EA doesn't check if a position is open already or not.
__________________
Make easy pips with the Advanced Economic Calendar for Forex Trading.
Reply With Quote
  #20 (permalink)  
Old 10-24-2006, 03:29 AM
gazuz's Avatar
Senior Trader and Moderat
 
Join Date: Aug 2004
Posts: 768
Thanks: 1
Thanked 8 Times in 5 Posts
gazuz is a name known to allgazuz is a name known to allgazuz is a name known to allgazuz is a name known to allgazuz is a name known to allgazuz is a name known to all
Default

no I mean if the price is over the resistance it will keep buying after every cycle of the DLM is over, usually it only does one trade per cross then ti does whatever the DLM has to do.. but here it keeps going until it crosses back into between the support and resistance.
__________________
____________________________\¦/
___________________________(ò ó)
______________________o0o___(_)___o0o__
___¦_____¦_____¦_____¦_____¦_____¦_____¦
¦_____¦_____¦_____¦_____¦_____¦_____¦__
___¦_____¦_____¦_____¦_____¦_____¦_____¦
¦_____¦_____¦_____¦_____¦_____¦_____¦__
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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Super Ea AQUILEZ Trading Systems 142 09-24-2008 01:25 PM
Astro traders... ttt123 General Trading Talk 37 08-03-2006 04:07 AM
Support and Resistance Expert Advisor suffic369 Classified Ads 2 07-03-2006 06:57 AM


All times are GMT. The time now is 01:41 AM.
Powered by vBulletin Version 3.6.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.1.0

Registered members have access to special online forex currency trading tools, software, mt4 expert advisors and indicators. Register now

Main Menu

Economic Forecast