[WARNING CLOSED!] Any newbie question, so as not to clutter up the forum. Professionals, don't go by. Can't go anywhere without you. - page 827
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
I just read a textbook the other day. I'm taking my first steps and of course I stumble. I'm stumped by this text...
double k = WindowPriceOnDropped( );
if (Ask >= k >= Bid)
{
Alert("You're pressing the wrong button");
return;
}
In theory, if the script is thrown between Ask and Bid, the body of the if statement should be executed, but it's not.
Is there an explanation? Or maybe I'm just overheated?
.
Good afternoon.
Could you please tell me how to draw an arbitrary line segment based on two coordinates ( time1,price1,time2,price2 )? I want a line segment, not a trend line. Horizontal or vertical lines can be plotted using a rectangle as the basis, an arbitrary line can be plotted using a triangle, but I want to draw a line segment, like a human being.
I would like to clarify one question - it is about opening a Stop order. In the simple case (Spread not taken into account):
Buy:
Sell:
.
But since Buy is triggered by Ask and Sell by Bid, Spread should be considered.
- Please change these lines to include the Spread.
I would like to clarify one question - it is about opening a Stop order. In the simple case (Spread not taken into account):
Buy:
Sell:
.
But since Buy is triggered by Ask and Sell by Bid, Spread should be considered.
- Please change these lines to include the Spread.
I.e., if we set BuyStop, OpenPrice should be = MarketInfo(Symbol(), MODE_ASK + Order_set_range);
If SellStop, then MarketInfo(Symbol(), MODE_BID - Order_setting_range);
For a BuyStop, its open price should be calculated from Ask, for a SellStop, from Bid. That's all.
I.e., if we set BuyStop, OpenPrice should be = MarketInfo(Symbol(), MODE_ASK + Order_setting_range);
If SellStop, then MarketInfo(Symbol(), MODE_BID - Order_setting_range);
Not quite - for a Stop order, the opening price may be, for example, in the case of Buy,
maximum of the previous fractal (=OpenPrice) + Spread
(provided that the Ask is lower than the fractal by the Stop_Level or more). I.e., the order is placed not on the Ask, but on some "external" condition.
But more to the point I would like to know about accounting for Spread in TakeProfit and StopLoss:
- In the case of Buy:
OrderSend(Symbol (), OP_BUYSTOP, Lots, OpenPrice+Spread, Slippage, OpenPrice-StopLoss, OpenPrice+TakeProfit+Spread, ...)
- Sell:
- Correct or am I missing something?