Forum

Problem with SL and TP when use buy/sell stop

HI, int orderSend = OrderSend ( Symbol (), OP_BUYSTOP, lotSize, Ask+OpenBuySellStop* _Point , Slippage,Bid-FixedSL* _Point , Bid+FixedTP* _Point , comment, MagicNumber, TimeCurrent ()+ 60 * 45 ); FixedSL = 300 points FixedTP = 1000 points I got BUY STOP: Price: 1.05837 SL: 1.04998 TP: 1.6298 So SL

How to get in real time last bar points for buy/sell for m15 TF

hi, I need to get how much is bullish or bearish candle in points in real time and after that use if something. I have M15 TF if is my candle bullish with 150 points then use if something if is my candle bearish with 150 points then use if something This must works in real time, not on new bar

Trigger on only new bar

hi, int start() { if (NewBar()== true ) { double sma6 = iMA ( Symbol (), 0 , 6 , 0 , MODE_SMA , PRICE_CLOSE , 0 ); Sleep ( 2000 ); //buy if (sma6<Close[ 0 ]) { SaveInfoMovingAverageToTheFile( "BUY" ); //

Problem with install EA from market

Hi, I have Internet Explorer 11 and I have trusted site and I have tried a lot of options, also with remove community folder still I have empty Market. How can I resolve this? Regards

Trailing stop for sell

Hi, this code works perfectly for buy, but for sell how to do this with char "<", ">" // Buy Order for ( int b= OrdersTotal ()- 1 ; b>= 0 ; b--) { if ( OrderSelect (b, SELECT_BY_POS, MODE_TRADES)) { if (OrderMagicNumber() == MagicNumber) { // This EA ownes it // Check the

Problem with trailing stop loss

Hi, code below works but only for buy, for sell not activated. What is problem? void AdjustTrail( double WhenToTrail, double TrailAmount) { int ticket = 0 ; // Loop through orders. // Buy Order for ( int b= OrdersTotal ()- 1 ; b>= 0 ; b--) { if ( OrderSelect (b, SELECT_BY_POS

Event Handling for close/open

Hi, how to get info when trade close or open? Is there any Event Handling? Regards

How can I get how much points are negative?

Hi, this is my code and works very well but how can if I have 1/2 points in negative amount then need to call something? MathAbs (( NormalizeDouble (((OrderOpenPrice() - (lowest- 30 * _Point )) / MarketInfo( Symbol (), MODE_POINT)), MarketInfo( Symbol (), MODE_DIGITS))) / point_compat * 10 ); So

How to Store StopLoss for trades and call if I change to 0

Hi, I want to store stoploss in StopLoss manually also if I change. I need to get only first StopLoss, and then change in variable only first time. If StopLoss has been changed in the future, in my variable this not change. My code: double point_value = 0 ; for ( int Counter = 0 ; Counter <=

How to get max DD floating?

Hi, I can see on details statement Maximal DD not means floating, but this is for me very important. How can I calculate Max DD for floating in my EA for each symbol