Please fix this indicator or EA - page 123

 
jzsuzsi:
OK, I understand that you can not ex4, but the auto-Profit 3.0 I wrote a fix lot and indicator.

Autoprofit 3.0 is a decompiled code. Please read this post again : https://www.mql5.com/en/forum/general Sorry, but I never alter or use decompiled code.

 

Hi mladen or all coders....

i just did simple EA long time ago but it is not working with new MT4 build 625... Thanks lot to senior mladen for helping me to clear all those warning and it did. But, another problem occur when it did not open position when condition to open is exist. may be something with the script. As far as I know, script to open position is like :

//========================================================

|| ( OrdersOpened < 1 ))

{

bprice = Ask;

openprice = 0;

if (TakeProfit == 0.0 )

{takeprofit = 0;} else {takeprofit = bprice + (TakeProfit*(PreviousOrders+1) * Point) ;}

if (InitialStop == 0.0)

{stoploss = 0;} else {stoploss = bprice - (InitialStop*(PreviousOrders+1) * Point) ;}

if (OrdersOpened != 0)

{

lots = lotsi;

for (cnt = 1; cnt <= OrdersOpened; cnt++)

{

if (MaxTrades > 1 )

{ lots=NormalizeDouble(lots*Multiple_Lot,2); }

else { lots=NormalizeDouble(lots*Multiple_Lot,2); }

}

}

else

{

lots = lotsi;

}

if (lots > MaxLot ) lots = MaxLot;

OrderSend = OrderSend(Symbol(),OP_BUY,lots,bprice,slippage,stoploss,takeprofit,Comments,MagicNumber ,0,Blue ) ;

return(0);

}

}

return(0);

}

//===================================================

or may be something is wrong with : "OrderSend" script....

 
fxgroup:
Hi mladen or all coders....

i just did simple EA long time ago but it is not working with new MT4 build 625... Thanks lot to senior mladen for helping me to clear all those warning and it did. But, another problem occur when it did not open position when condition to open is exist. may be something with the script. As far as I know, script to open position is like :

//========================================================

|| ( OrdersOpened < 1 ))

{

bprice = Ask;

openprice = 0;

if (TakeProfit == 0.0 )

{takeprofit = 0;} else {takeprofit = bprice + (TakeProfit*(PreviousOrders+1) * Point) ;}

if (InitialStop == 0.0)

{stoploss = 0;} else {stoploss = bprice - (InitialStop*(PreviousOrders+1) * Point) ;}

if (OrdersOpened != 0)

{

lots = lotsi;

for (cnt = 1; cnt <= OrdersOpened; cnt++)

{

if (MaxTrades > 1 )

{ lots=NormalizeDouble(lots*Multiple_Lot,2); }

else { lots=NormalizeDouble(lots*Multiple_Lot,2); }

}

}

else

{

lots = lotsi;

}

if (lots > MaxLot ) lots = MaxLot;

OrderSend = OrderSend(Symbol(),OP_BUY,lots,bprice,slippage,stoploss,takeprofit,Comments,MagicNumber ,0,Blue ) ;

return(0);

}

}

return(0);

}

//===================================================

or may be something is wrong with : "OrderSend" script....

In the part of the code there s no visible reason that would prevent your code from opening orders. The only "interesting" part is the first line (this one :

|| ( OrdersOpened < 1 ))

which is obviously a part of some boolen conditions evaluation. If there are "and" (&&) and "or" (||) operation mixed in conditions, make sure that you place "or" operations in brackets or it can work in completely different manner than in build 509 and earlier

 

Hi mladen or all coders....

As nothing is wrong with previous part of script, could you please check this another part of script. I do not know much about script but i think it suppose to be script which responsible to open position ...... Thank you.

====================================

lotsi = FirstOrderLots;

if (lotsi > 100) lotsi = 100;

if (lotsi < 0.01) lotsi = 0.01;

OrdersOpened = 0;

for (cnt = 0; cnt < OrdersTotal(); cnt++)

{

OrderSelect = OrderSelect(cnt,SELECT_BY_POS,MODE_TRADES);

type = OrderType();

//-------------magic number------------------------

if (OrderMagicNumber() == MagicNumber )

//------------------------------------------------

if (OrderSymbol() == Symbol()) OrdersOpened++;

}

PipValue=MarketInfo(Symbol(),MODE_TICKVALUE);

if (PipValue == 0.0) PipValue = 5;

if (PreviousOrders > OrdersOpened)

{

for (cnt = OrdersTotal(); cnt >= 0; cnt--)

{

OrderSelect = OrderSelect(cnt,SELECT_BY_POS,MODE_TRADES);

type = OrderType();

//-------------magic number------------------------

if (OrderMagicNumber() == MagicNumber )

//------------------------------------------------

if (OrderSymbol() == Symbol())

{

if ((type == OP_BUY) && (OrderMagicNumber ()== MagicNumber) ) OrderClose = OrderClose(OrderTicket(),OrderLots(),OrderClosePrice(),slippage,Blue);

if ((type == OP_SELL) && (OrderMagicNumber ()== MagicNumber) ) OrderClose = OrderClose(OrderTicket(),OrderLots(),OrderClosePrice(),slippage,Red);

}

}

}

PreviousOrders = OrdersOpened;

if (OrdersOpened >= MaxTrades) EnableTrading = false;

else EnableTrading = true;

if (openprice == 0.0)

{

for (cnt = 0; cnt < OrdersTotal(); cnt++)

{

OrderSelect = OrderSelect(cnt,SELECT_BY_POS,MODE_TRADES);

type = OrderType();

//-------------magic number------------------------

if (OrderMagicNumber() == MagicNumber )

//------------------------------------------------

if (OrderSymbol() == Symbol())

{

openprice = OrderOpenPrice();

if (type == OP_BUY ) {state = 2 ;}

if (type == OP_SELL ) {state = 1 ;}

}

}

}

//+----------------------------------------------------------------

//+ CONDITION FOR OPEN POSITION - BUY AND SELL

//+----------------------------------------------------------------

if (OrdersOpened<1)

{

state = 3;

//+-----------------------------------------------------------------

//+ CONDITION FOR OPEN BUY - PASTE INDICATOR HERE!

//+-----------------------------------------------------------------

if ( ( FXG_MBUY == true )

//------------------------------------------------

) state = 2; //+ OPEN BUY - basic code

//+------------------------- END FOR OPEN BUY ----------------------

//+ CONDITION FOR OPEN SELL - PASTE INDICATOR HERE !

//+-----------------------------------------------------------------

if ( ( FXG_MSELL == true )

//------------------------------------------------------

) state = 1 ; //+ OPEN SELL - basic code

//+------------------------ END FOR OPEN SELL ----------------------

if (ReverseCondition == true )

{

if (state == 1 ) {state = 2;}

else

{if (state == 2 ) {state = 1;}

}

}

}

========================================

 
fxgroup:
Hi mladen or all coders....

As nothing is wrong with previous part of script, could you please check this another part of script. I do not know much about script but i think it suppose to be script which responsible to open position ...... Thank you.

====================================

========================================

Can you post the whole script?

 
prykala:
Hi Mladen and all coders

I don't know why this indicator dont show in my MT4. I dont see it in my list of custom indicators of the left side. I dont have to much indicators because i have only this one.

Can you help my?

I try another version of this indi but all the same story...

bb_alert_arrows.ex4

repainting

 
mladen:
Can you post the whole script?

Hi mladen....

I just try to post the whole script here but it not supported... may be because it take more space ... about 860 lines of script. can you suggest me how to post here ? or send to your email as file..... Thank you..

 
fxgroup:
Hi mladen.... I just try to post the whole script here but it not supported... may be because it take more space ... about 860 lines of script. can you suggest me how to post here ? or send to your email as file..... Thank you..

You have to attach it (the script file)

Go to advanced and there you will find a way how to attach a file

 

Hi mladen....

Thanks for telling about this section to attach file...

 
fxgroup:
Hi mladen.... Thanks for telling about this section to attach file...

Will need some time to check it (it s not as simple as the name is telling )