how much are you willing to pay?
all i need from you is the formula to generate the value of the indicator on bar[1] and [2]
for example-Main stochastic on bar[1] equals = iStochastic(NULL,0,5,3,3,MODE_SMA,0,MODE_MAIN,1)
but i don't know how to get this from a custom indicator like SDL-MAM .
kindly help.
ah ok, search the documentation for iCustom()
//z
maybe can be like this:
extern double TakeProfit = 20; extern double StopLose = 20; extern double Lots = 0.1; double Pip; int init(){ Pip = Point; if(Digits==3||Digits==5)Pip*=10; TakeProfit *= Pip; StopLose *= Pip; } int start() { int ticket; double sdl02 =iCustom(NULL,0,"SDL_MAM_1",0,1); double sdl12 =iCustom(NULL,0,"SDL_MAM_1",0,2); double sdl13 =iCustom(NULL,0,"SDL_MAM_1",0,3); if(New_Bar()){ if(sdl12<sdl02 && sdl13>sdl12) { ticket=OrderSend(Symbol(),OP_BUY,Lots,NormalizeDouble(Ask,4),3,NormalizeDouble(Ask-StopLose,Digits),NormalizeDouble(Ask+TakeProfit,Digits),0,Green) ; } } return(0); } bool New_Bar() { static datetime New_Time=0; if(New_Time!=Time[0]){ New_Time=Time[0]; return(true); } return(false); }
The indicator has 3 inputs:
extern int period=20;
extern int method=3;
extern int price=0;
And it has 3 buffers.
To use iCustom to get the first buffer:
double buf0 = iCustom(NULL,0,"SDL_MAM_1",period,method,price,0,1);
The above code will return the value of the first buffer for bar 1.
It's an easy task to get the other buffers and the other bars.
For further help you can reach me at: MQLTALK
hello codersguru..
it's seems u are the strongest coder in this forums.. hehe..
i want to ask about this indicator : bandwith indicator..
i want to get the maximum and minimum value..
because in the indicator not have buffer : maximum and minimum value...
so i add like this:
#property indicator_minimum 0.10 #property indicator_maximum 2
but the value not automatic..
i want the max and min are automatic...
without using this code#property indicator_minimum 0.10 #property indicator_maximum 2
the indicator will displayed value automatic based of trend power.., sometimes 0-1,8 ... sometimes 0,24-2,85..
from that, i want to get the middle of that value..
example:
curent bar middle value= curent maximum value - curent minimum value
how to add it to indicator?
or direct can add to ea?
thx..
The indicator has 3 inputs:
extern int period=20;
extern int method=3;
extern int price=0;
And it has 3 buffers.
To use iCustom to get the first buffer:
The above code will return the value of the first buffer for bar 1.
It's an easy task to get the other buffers and the other bars.
For further help you can reach me at: MQLTALK
@ hardyyanto,
thanks a lot for your contribution,
@ codersguru,
thanks so much,i have contacted you as you asked on MQLTALK, expecting the remaining buffers to enable me finish the coding. thanks
Hi all,
Please i need your help to create an EA for SDL-MAM indicator(attached), i need it to place a buy order when its value in Bar[1] is greater than its value on bar[2],
and it should place sell order if the value on bar [1] is lesser than value on bar [2]. and i would like it to trade many pairs simultaneously. kindly help me with this .thanks in advance.
KC
Hi,
take a look at the code of the indicator. It repaints!
rs
Hi,
take a look at the code of the indicator. It repaints!
rs
i know that, and that's why i'm only interested in the value of the indicator and not the colours.
can u help me to get the values on bar[1] (last bar before the current bar) and bar [2] (the bar before the last)?
thanks
i know that, and that's why i'm only interested in the value of the indicator and not the colours.
can u help me to get the values on bar[1] (last bar before the current bar) and bar [2] (the bar before the last)?
thanks
Hi,
As stated before. You have to call the iCustom function for bar[1] and bar[2] .
double buf0 = iCustom(NULL,0,"SDL_MAM_1",period,method,price,0,1);
double buf0 = iCustom(NULL,0,"SDL_MAM_1",period,method,price,0,2);
I am not an EA expert. There are better ones.... But honestly, I do believe in indicators, I don’t believe in EA. On every day the chart looks different. Try to trade according to the indicator. After some time you may decide the indicator is worth to write an EA.
rs
![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hi all,
Please i need your help to create an EA for SDL-MAM indicator(attached), i need it to place a buy order when its value in Bar[1] is greater than its value on bar[2],
and it should place sell order if the value on bar [1] is lesser than value on bar [2]. and i would like it to trade many pairs simultaneously. kindly help me with this .thanks in advance.
KC