| New signals service! | |
|
|||||||
| 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 |
|
![]() |
|
|
LinkBack (1) | Thread Tools | Display Modes |
|
|||
|
It sent me in the right direction- thanks man, really appreciated.
My new issue is that when my if statement is called.... It goes off the previous indicator bar's value in relation to the current bar, and sends an Alert(); that I created... about 20 times. How would I go about having it only send the once? I tried created and on/off switch using variables-- doesn't work in MQL4 unfortunately. Then I thought about Timers... if there was a timer I could create that only Alerted once over a 20 sec period that would work too.... But I'm a loss as to an idea that would actually be possible in MQL4. Any ideas? |
|
||||
|
Quote:
Maybe you could set up a boolean true/false to be tripped after the alert is sent the first time. |
|
|||
|
I'm not sure which code would make any sense. Here's my if statement for the alert.
Quote:
How would I go about setting up a boolean true/false thing? I tried doing this..... Quote:
There's something else I could do using boolean is there? Any ideas on how I can go about doing that? At the moment it works fine as far as alerting me goes, it just alerts me about 5-6 times. Appreciate the time and help mate. -dharsant |
|
|||
|
I found this by Codersguru;
PHP Code:
In using this with my indicator... Would I just place the function in my script, and then use AlertOnce("Sniper going LONG",10); in place of my Alert(); ? I feel like a pesty little inexperienced programmer ![]() |
|
||||
|
I can't quite get this right I am trying to get my ea to buy when all blue and sell when all red. The ea open and closes but not in the right place what do I need to look at.
double TML=iCustom(NULL,0,"TrendManager",TM_Period,TM_Shi ft,0,shift); double TMS=iCustom(NULL,0,"TrendManager",TM_Period,TM_Shi ft,1,shift); double hasOpen = iCustom(NULL,0,"Heiken_Ashi_Smoothed",MaMetod,MaPe riod,MaPeriod2,1,shift) ; double hasClose = iCustom(NULL,0,"Heiken_Ashi_Smoothed",MaMetod,MaPe riod,MaPeriod2,0,shift) ; double HeikenAshiOpen=iCustom(NULL,0,"Heiken_Ashi_Smoothe d",MaMetod,MaPeriod,MaPeriod2,2,shift); double HeikenAshiClose=iCustom(NULL,0,"Heiken_Ashi_Smooth ed",MaMetod,MaPeriod,MaPeriod2,3,shift); double SDLL=iCustom(NULL,0,"Slope Direction Line",period,method,price,1,shift); double SDLS=iCustom(NULL,0,"Slope Direction Line",period,method,price,2,shift); buysig=false; sellsig=false; closebuy=false; closesell=false; bool Long = TML && SDLL && HeikenAshiOpen < HeikenAshiClose && hasOpen < hasClose; bool Short = TMS && SDLS && HeikenAshiOpen > HeikenAshiClose && hasOpen > hasClose; buysig = Long; sellsig = Short; closebuy=sellsig; closesell=buysig; |
![]() |
| Bookmarks |
| Tags |
| candle time, CHinGsMAroonCLK, coders guru, expert advisor, forex, how to code, I_XO_A_H, mechanical trading, trading |
| Thread Tools | |
| Display Modes | |
|
|
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 07: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 05:22 PM |