Multi Timeframe Indicators - page 1129

Mladen Rakic
154494
Mladen Rakic  
Jeaa:

Hi mladen... Thanks for your reply...

2016.09.06 11:42:06.700 NewBar_jeaa_Rev 2 USDJPY,M1: Alert: USDJPY: Barras= 3, Min= 102.11600
2016.09.06 11:41:36.561 NewBar_jeaa_Rev 2 USDJPY,M1: Alert: USDJPY: Barras= 3, Min= 102.11600
2016.09.06 11:41:36.561 NewBar_jeaa_Rev 2 USDJPY,M1: trade operations not allowed by settings
2016.09.06 11:41:36.396 NewBar_jeaa_Rev 2 USDJPY,M1: initialized
2016.09.06 11:41:36.385 NewBar_jeaa_Rev 2 USDJPY,M1 inputs: GV_CantidadBarras=3; digits=5; Lots=0.01; StopLoss=100.0; TakeProfit=100.0; Slippage=3;
2016.09.06 11:41:35.080 Expert NewBar_jeaa_Rev 2 USDJPY,M1: loaded successfully


2016.09.06 12:57:08.587 '502630': order buy 0.01 USDJPY opening at market sl: 50.000 tp: 50.000 failed [Invalid S/L or T/P]
2016.09.06 12:57:08.268 '502630': order buy market 0.01 USDJPY sl: 50.000 tp: 50.000
2016.09.06 12:56:07.224 '502630': order buy 0.01 USDJPY opening at market sl: 50.000 tp: 50.000 failed [Invalid S/L or T/P]
2016.09.06 12:56:06.921 '502630': order buy market 0.01 USDJPY sl: 50.000 tp: 50.000
2016.09.06 12:56:04.221 Automated trading enabled

As you can see your stop loss and take profit are wrong

You are calculating those wrong : stop loss and take profit are calculated as order open price +- stop loss and/or take profit  (the + or - depends on the type of the orders) but not as 50 (like in your case) but it would be order open price +- 50*_Point (for points) or 50*_Point*MathPow(10,MathMod(_Digits,2)) for pips distance from the order open price

jeaa
16
jeaa  
mladen:

As you can see your stop loss and take profit are wrong

You are calculating those wrong : stop loss and take profit are calculated as order open price +- stop loss and/or take profit  (the + or - depends on the type of the orders) but not as 50 (like in your case) but it would be order open price +- 50*_Point (for points) or 50*_Point*MathPow(10,MathMod(_Digits,2)) for pips distance from the order open price

Dear mladen...


Thanks for your help... I changed for:


   double SL=NormalizeDouble(Precio - StopLoss*Point,Digits);
   double TP=NormalizeDouble(Precio + TakeProfit*Point,Digits);
  
int ticket=OrderSend(Symbol(),OP_BUY,Lots,Precio,Slippage,SL,TP,"Jeaa",0,0,Blue);


And work properlly.


Best regards.


Jesús

Mladen Rakic
154494
Mladen Rakic  
Jeaa:

Dear mladen...


Thanks for your help... I changed for:


   double SL=NormalizeDouble(Precio - StopLoss*Point,Digits);
   double TP=NormalizeDouble(Precio + TakeProfit*Point,Digits);
  
int ticket=OrderSend(Symbol(),OP_BUY,Lots,Precio,Slippage,SL,TP,"Jeaa",0,0,Blue);


And work properlly.


Best regards.


Jesús

Good. Happy trading :)
DDAV
34
DDAV  

Hi guys,

May you add the time frame in the alert message in the file attached please ?

thank you very much :)

sameermehta74
52
sameermehta74  

Dear Mladen,

Apologies for posting this request here as I am not aware of right place.

Is it possible to add an option of Current Symbol Only in the attached indicator.

If you could, it would really help a lot :) 

Cheers. 

Sameer 

Files:
Mladen Rakic
154494
Mladen Rakic  
DRADIS33:

Hi guys,

May you add the time frame in the alert message in the file attached please ?

thank you very much :)

Here is a version with that added


Mladen Rakic
154494
Mladen Rakic  
sameermehta74:

Dear Mladen,

Apologies for posting this request here as I am not aware of right place.

Is it possible to add an option of Current Symbol Only in the attached indicator.

If you could, it would really help a lot :) 

Cheers. 

Sameer 

You have a very easy solution. Add this line :

      StringReplace(Symbols,"current",_Symbol);

before line 64, and then in the symbols list enter "current" any where in the string (without the ""), and it will be replaced with the current symbol. Or use the attached :) (same rules for the current symbol applied : to have only the current symbol displayed, enter only "current" in the symbols list)

Files:
sameermehta74
52
sameermehta74  
mladen:

You have a very easy solution. Add this line :

before line 64, and then in the symbols list enter "current" any where in the string (without the ""), and it will be replaced with the current symbol. Or use the attached :) (same rules for the current symbol applied : to have only the current symbol displayed, enter only "current" in the symbols list)

Thank you :) Much appreciated.
mntiwana
4549
mntiwana  
mladen:

You have a very easy solution. Add this line :

before line 64, and then in the symbols list enter "current" any where in the string (without the ""), and it will be replaced with the current symbol. Or use the attached :) (same rules for the current symbol applied : to have only the current symbol displayed, enter only "current" in the symbols list)

Dearest MLADEN

Is this a general/standard coding formula to add current symbol option in any indicator ?

regards

Mladen Rakic
154494
Mladen Rakic  
mntiwana:

Dearest MLADEN

Is this a general/standard coding formula to add current symbol option in any indicator ?

regards

mntiwana

No. Just in the case of this indicator