You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Thanks
but i am quite a newbie to coding
can i change to if a mt4 named xyz indicator has following parameters:
extern int A=9;
extern int B=14;
extern int D = 10;
and icustom part asE= iCustom(Null,timeframe,"xyz",A,B,D,BufferNumber,Shift); ?but i do not much understand BufferNumber and Shift? what does that means? thanks
annbee
Check this thread for details : https://www.mql5.com/en/forum/173108
hi mladen,
may be i think i made some mistakes previously,
xyz should be like this:
extern int A=9;
extern int B=14;
extern double D = 10;
question1:and icustom part asE= iCustom(Null,timeframe,"xyz",A,B,D,0,pos); is it ok/ correct?? thanks
question2:and icustom part asE= iCustom(Null,timeframe,"xyz",A,B,0,pos); how about if i intentionally or mistakenly miss out the D in icustom sentence, is it ok work or missing something in display or calculation or total incorrect? thanks for comments.
hi mladen,
may be i think i made some mistakes previously,
xyz should be like this:
extern int A=9;
extern int B=14;
extern double D = 10;
question1:and icustom part asE= iCustom(Null,timeframe,"xyz",A,B,D,0,pos); is it ok/ correct?? thanks
question2:and icustom part asE= iCustom(Null,timeframe,"xyz",A,B,0,pos); how about if i intentionally or mistakenly miss out the D in icustom sentence, is it ok work or missing something in display or calculation or total incorrect? thanks for comments.If you omit one parameter from the tail of the parameters list, default value for parameter will be used, but please read that thread for details how is iCustom() function used and what are the exact parameters for iCustom() function
hi mladen
my coding level is very low because i just has very raw computing learning before, i just want to make something work for me without too sophiscated coding, most things i am not very understand even read the thread ,
because i even not clear the difference between concept of double, string, etc.
but my question is just that, it seems the key here is D, so my question is: is it whether : extern int D=10 or extern double D=10 ,icustom part asE= iCustom(Null,timeframe,"xyz",A,B,D,0,pos); is it ok/ correct?? thanks
hi mladen
my coding level is very low because i just has very raw computing learning before, i just want to make something work for me without too sophiscated coding, most things i am not very understand even read the thread ,
because i even not clear the difference between concept of double, string, etc.
but my question is just that, it seems the key here is D, so my question is: is it whether : extern int D=10 or extern double D=10 ,icustom part asE= iCustom(Null,timeframe,"xyz",A,B,D,0,pos); is it ok/ correct?? thanks
anbbeea,
Yes, that is correct
Hello Mladen ,
May i know about the ray on chart can be adjust how long to the right side that i want ?
How to change this >
please have tried to make the arrow appear after the close of the signal candle in other to avoid repainting but all to no avail.
please help me out MR. TOOLS and MLADEN, below are the attached.mladen & mrtools
I have an EA that blast it self with trades. I need help to build a Void or function that can be added to an existing EA. This function needs to address:
input bool doBasketExit = true; // Check for Basket Exit conditions
input double BasketTP = 250.0; // Basket Take Profit (Account Currency) The chart Pair
input double BasketSL = -100.0; // Basket Stop Loss (Account Currency) The chart Pair
Im running 9 pairs/Charts with aggressive EA on the H1 and I want pair specific basket trading on each of the 9 charts.
Here's what just happened to me. 9 charts running, 3 charts are in trade with, of course, 3 separate pairs, each with 15 trades, yes 45 trades open, 2 are in profit & one is losing badly. I looking for a way to add up each group/pair of the 15 separately and rub each group against a Basket SL & TP boundaries. I found a basket set up but of course it needs refinement. The trick is to get the same pair added up from the Order Profit Trade column. By being on a Chart with a specific pair I thought I come up with a void but its kind of complicated. The function must somehow read the OrderProfit by Pair???
See my code as a poor example;
void closeTrades( CURRENCY* ¤cies[] ) {
// Check for Basket Exit
if ( doBasketExit ) {
double basketProfit = getBasketProfit();
if ( ( ( BasketTP > 0.0 ) && ( basketProfit > BasketTP ) ) ||
( ( BasketSL < 0.0 ) && ( basketProfit < BasketSL ) ) ) {
closeAll();
}
}
double getBasketProfit() {
double basketProfit = 0.0;
for (int iOrder=OrdersTotal()-1; iOrder >= 0; iOrder--) {
if (OrderSelect(iOrder,SELECT_BY_POS,M ODE_TRADES)) {
if ( OrderMagicNumber() == MagicNumber ) {
if ( (OrderType() == OP_BUY) || (OrderType() == OP_SELL) ) {
basketProfit += OrderProfit() + OrderSwap() + OrderCommission();
}
}
}
}
return(basketProfit);
}
void closeAll() {
double closePrice;
string symbolName;
int result;
for (int iOrder=OrdersTotal()-1; iOrder >= 0; iOrder--) {
if (OrderSelect(iOrder,SELECT_BY_POS,M ODE_TRADES)) {
if ( OrderMagicNumber() == MagicNumber ) {
if ( (OrderType() == OP_BUY) || (OrderType() == OP_SELL) ) {
symbolName = OrderSymbol();
closePrice = ( OrderType() == OP_BUY ) ? MarketInfo( symbolName, MODE_BID ) : MarketInfo( symbolName, MODE_ASK );
result = OrderCloseReliable(OrderTicket(), OrderLots(), closePrice, 50 );
}
}
Really appreciate you looking into this
Thanks
Ray
Hello Mladen ,
May i know about the ray on chart can be adjust how long to the right side that i want ?
How to change this >
Try doing the following :
Instead of
please have tried to make the arrow appear after the close of the signal candle in other to avoid repainting but all to no avail.
please help me out MR. TOOLS and MLADEN, below are the attached.kapoo
Currently uploads are not working so I can not see your files
As soon as those issues are solved, we shall resume. OK?