#11 (permalink)  
Old 10-10-2006, 02:55 AM
gazuz's Avatar
Forex Honorary Moderator
 
Join Date: Aug 2004
Location: California
Posts: 753
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
Forex Guru
 
Join Date: Aug 2004
Location: Behind You
Posts: 2,105
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
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.
mamee likes this.
__________________
Make easy pips with the Advanced Economic Calendar for Forex Trading.
Reply With Quote
  #13 (permalink)  
Old 10-10-2006, 05:57 AM
gazuz's Avatar
Forex Honorary Moderator
 
Join Date: Aug 2004
Location: California
Posts: 753
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
Forex Honorary Moderator
 
Join Date: Aug 2004
Location: California
Posts: 753
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, 972 views)
Advertisement
__________________
____________________________\¦/
___________________________(ò ó)
______________________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
Forex Guru
 
Join Date: Aug 2004
Location: Behind You
Posts: 2,105
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
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
Forex Honorary Moderator
 
Join Date: Aug 2004
Location: California
Posts: 753
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
Forex Guru
 
Join Date: Aug 2004
Location: Behind You
Posts: 2,105
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
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
Forex Honorary Moderator
 
Join Date: Aug 2004
Location: California
Posts: 753
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
Forex Guru
 
Join Date: Aug 2004
Location: Behind You
Posts: 2,105
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
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
Forex Honorary Moderator
 
Join Date: Aug 2004
Location: California
Posts: 753
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

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Astro traders... ttt123 General Trading Talk 46 06-07-2012 08:13 AM
Super Ea AQUILEZ Trading Systems 152 03-28-2012 08:22 PM
Support and Resistance Expert Advisor suffic369 Classified Ads 3 03-12-2010 02:38 PM


All times are GMT. The time now is 11:52 AM.

Registered members gain free access to online FOREX currency trading tools, foreign exchange software, Metatrader MT4/MT5 expert advisors, MT4 indicators and EAs. Register now