| 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 |
|
|||
|
How to make an indicator work on another indicator?
If you drop the basic moving average (included as indicator in MT4) on another indicator, it is possible to calculate the MA of the indicator, but how do you change a custom indicator in such a way that it's possible to drop it on another indicator?
__________________
tensigma.blogspot.com |
|
|||
|
#property copyright "沈欣"
#property link "shenxinon@126.com" #property indicator_separate_window #property indicator_buffers 1 #property indicator_color1 SteelBlue //#property indicator_minimum -0.01 //#property indicator_maximum 0.01 //---- input parameters extern int SMA1=12; extern int SMA2=72; //---- buffers double ExtMapBuffer1[]; //---- 自定义区 //+------------------------------------------------------------------+ //| Custom indicator initialization function | //+------------------------------------------------------------------+ int init() { //---- indicators SetIndexStyle(0,DRAW_LINE); SetIndexBuffer(0,ExtMapBuffer1); string sName="RAVI indicator"; IndicatorShortName("RAVI indicator("+SMA1+","+SMA2+")"); //---- return(0); } //+------------------------------------------------------------------+ //| Custom indicator deinitialization function | //+------------------------------------------------------------------+ int deinit() { //---- //---- return(0); } //+------------------------------------------------------------------+ //| Custom indicator iteration function | //+------------------------------------------------------------------+ int start() { int counted_bars=IndicatorCounted(); //---- if(counted_bars<0) return(-1);// if there is a error then exit and return -1 if(counted_bars>0) counted_bars--; int pos = Bars-counted_bars; double sma1,sma2,r; while(pos>=0) { sma1=iMA(NULL,0,SMA1,0,MODE_SMA,PRICE_CLOSE,pos); sma2=iMA(NULL,0,SMA2,0,MODE_SMA,PRICE_CLOSE,pos); r=((sma1-sma2)/sma2)*10000; //Alert("r=",r); ExtMapBuffer1[pos]=r; pos--; } return(0); |
|
|||
|
trend Envelope EA
Hola
I'm teaching mql. I read Usage of Technical Indicators - Simple Programs in MQL4 - MQL4 Tutorial, but i don't find something like Is it possible to color a single bar?Exemple during test your EA u can color the entry bar... On metatrader i don't see any watch system, like to see the field of my variabile array there is in all C compilator I wanto to to do this stupid system: When price broke and close up the trend evelope (look the pic wich yellow cirlce) i open an alert and color a breakbar. But my problem is that this that i read only the trend up indicator and not during short period why?? Code:
double maxprec= iHigh(NULL, PERIOD_M5,1);
double minprec=iLow(NULL, PERIOD_M5,1);
double chiusura2 = iClose(NULL,PERIOD_M15 ,2);
double chiusura = iClose(NULL,PERIOD_M15 ,1);
double chiu2 = iClose(NULL,PERIOD_M5 ,2);
double chiu = iClose(NULL,PERIOD_M5 ,1);
double apertura = iOpen(NULL,PERIOD_M15 ,0)
string rottura [3] = {" Nulla"," ROTTO"};
envelope15_1=iCustom(NULL, PERIOD_M15, "TrendEnvelopes_v1", 5,0,1);// trend envelope
if( chiusura2 > envelope15_2 && chiusura < envelope15_2 && apertura <= envelope15_2)
{
rot=1;
Alert ( " ha rotto SH M15");
}
else
rot=0;
Comment( ""\nBreak Enveolpe M 5= ", rottura[rot2],
"\nBrerak Enveolpe M 15= ", rottura[rot]
); // Alert
|
|
|||
|
Quote:
pipvalue=MarketInfo("EURCHF",MODE_TICKVALUE); Hope this helps ![]()
__________________
Need a professional MQL4 programmer? PM me |
|
|||
|
Need the code to stop the open of positions after a certain time
I've already seen all the posts in this section and I've made a research on all the forum using the google search tool at the top of the forum, but what I've found is not exactly what I'm looking for.
What I need is a code that I have to implement in my EA that stops to open new position after a certain hour, for example after 15 GMT. This parameter should be a setting that I can modify from the user panel. It would be great if I could set a period of time in which the EA can open the positions, so Open from X hours until Y hours Thanks for your help. Regards
__________________
I'm studing to become an MQL Programmer! ![]() The best strategy to use ForexKiller. Try it: http://forex-killerallday.blogspot.com/ |
|
|||
|
Quote:
Quote:
Quote:
FerruFx
__________________
THE HEART of FOREX & THE PROBABILITY METER - Trade with 100% confidence and ... Stress Less!!! Coding services: Experts Advisors, indicators, alerts, etc ... more info by PM NEW: video presentation of the Probability Meter ... 24hrs action on the website |
![]() |
| 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 |