Coding help - page 472

Mladen Rakic
168766
Mladen Rakic  
systemfault:
im added this code;

int CheckForClose()

{

if(getProfit()>=Amount){CloseAll();}

if(LockDown>0)

{

for(int TradeNumber = OrdersTotal(); TradeNumber >= 0; TradeNumber--)

{

if (OrderSelect(TradeNumber, SELECT_BY_POS, MODE_TRADES)&&(LockDown>0))

{ int Pos=OrderType();

if((Pos==OP_BUY)&&(Bid-OrderOpenPrice()>Point*MathPow(10,_Digits%2)*LockDown)&&(OrderStopLoss() == 0))

{OrderModify(OrderTicket(),OrderOpenPrice(),OrderOpenPrice()+Point,OrderTakeProfit(),0,CLR_NONE);}

if((Pos==OP_SELL)&&(OrderOpenPrice()-Ask>Point*MathPow(10,_Digits%2)*LockDown)&&(OrderStopLoss() == 0))

{OrderModify(OrderTicket(),OrderOpenPrice(),OrderOpenPrice()-Point,OrderTakeProfit(),0,CLR_NONE);}

}

}

}

}

For example; EUR/USD order price 1.12345 sl/tp 1.12346

i want to sl/tp 1.12355

im not understanding whats going wrong?

OrderOpenPrice()+Point

That takes open price and places take profit 1 point away from order open price

systemfault
13
systemfault  
mladen:
OrderOpenPrice()+Point That takes open price and places take profit 1 point away from order open price

How to change 1 point to 10 point?

Example: OrderOpenPrice()+10 Point TakeProfit

OrderOpenPrice()-10 Point Stoploss

Mladen Rakic
168766
Mladen Rakic  
systemfault:
How to change 1 point to 10 point?

Example: OrderOpenPrice()+10 Point TakeProfit

OrderOpenPrice()-10 Point Stoploss

OrderOpenPrice()+10*Point for a buy order

OrderOpenPrice()-10*Point for a sell order

systemfault
13
systemfault  
mladen:
OrderOpenPrice()+10*Point for a buy order OrderOpenPrice()-10*Point for a sell order

Yeah... i coded...

im try now

Thank you for your interest mladen..

pking25
242
pking25  

Hi mladen, If this would take up too much of your time I will understand, you have provided plenty of help for me in the pass.

I need the attached indicator to be altered so that there is two alerts - one for the upper line breakout, and one for the lower line breakout : If possible, both with user input of a wav. alert.

Files:
Mladen Rakic
168766
Mladen Rakic  
Jeeves:
Hi mladen, If this would take up too much of your time I will understand, you have provided plenty of help for me in the pass. I need the attached indicator to be altered so that there is two alerts - one for the upper line breakout, and one for the lower line breakout : If possible, both with user input of a wav. alert.

Jeeves

As far as I see it already has those two types of alerts

pking25
242
pking25  

Yes I see it....told you I was a real dummy at this coding game! many thanks fellow, have a great weekend.

jaques
5
jaques  

If anyone could help me with this. I am trying to code this ea to open on signal based of this indicator. Any help or advice would be apprecited.

pipdink_ea.mq4pipdink_signal.mq4

Files:
Mladen Rakic
168766
Mladen Rakic  
pipdink:
If anyone could help me with this. I am trying to code this ea to open on signal based of this indicator. Any help or advice would be apprecited. pipdink_ea.mq4pipdink_signal.mq4

Even though the indicator us a decompiled one, you have 2 problems with it :

1. It is a ma cross of current and future bar value (repaints)

2. It is almost sure that the values tested will never be equal to current Bid

Try using some other ma cross indicator

zigflip
392
zigflip  

Please help fix this indicator, because it keeps alerting even when every alert option is set to "false"

is mr Tools version i think...

sincerely,