5 decimal places after point BROKER for EURUSD etc... - SendOrder() question

 
I have non standard BROKER with 5 decimal places after point.

When I open order I have to do something like following :
extern bool FractionalPips = false;

int start()
{

double ticket0, ticket1;

if(FractionalPips==true) {pip=10;} else pip =1;

ticket0=OrderSend(Symbol(),OP_SELL,0.35,Bid,Slippage,0,0,"OpenSell on the chart "+Period(), magic_number_for_sell,0,Red);
if (ticket0>0)
{
OrderSelect(ticket0,SELECT_BY_TICKET);
OrderModify(OrderTicket(),OrderOpenPrice(),SL_for_Sell,TPS,0,Green);
}
else
{
Print("Error opening position open sell ",Symbol()," error code: ",GetLastError());
}


ticket1=OrderSend(Symbol(),OP_BUY,0.35,Ask,Slippage,0,0,"OpenBuy on the chart "+Period(), magic_number_for_buy,0,Blue);
if (ticket1>0)
{
OrderSelect(ticket1,SELECT_BY_TICKET);
OrderModify(OrderTicket(),OrderOpenPrice(),SL_for_Buy,TPB,0,Green);
}
else
{
Print("Error opening position open buy ",Symbol()," error code: ",GetLastError());
}




My QUESTION IS: Can I make open order by OrderSend() function directly with defined Stop Loss & Take Profit without OrderModify() after place the order to the BROKER's system?
 
puncher:
My QUESTION IS: Can I make open order by OrderSend() function directly with defined Stop Loss & Take Profit without OrderModify() after place the order to the BROKER's system?

If the broker doesn't allow it then there is no way around it. To be accurate, it's not the broker, it's the bridge they use. Specifically, AFAIK all brokers with BT bridge don't allow direct SL/TP with OrderSend().

 
gordon:

If the broker doesn't allow it then there is no way around it. To be accurate, it's not the broker, it's the bridge they use. Specifically, AFAIK all brokers with BT bridge don't allow direct SL/TP with OrderSend().


(gordon) Please answer me on this question:

Do you know any FOREX BROKER without the BRIDGE ?

Can I invest on FOREX MARKET directly without the BRIDGE or FOREX BROKER ?

Regards,

puncher

 
Most brokers aren't using a bridge. Try IBFX.
Your problem may be not adjusting for a 5 digit broker where a pip is not a point. All TP, SL, and slippage values must be adjusted:
//++++ These are adjusted for 5 digit brokers.
double  pips2points,    // slippage  3 pips    3=points    30=points
        pips2dbl;       // Stoploss 15 pips    0.0015      0.00150
int     Digits.pips;    // DoubleToStr(dbl/pips2dbl, Digits.pips)
int init() {
    if (Digits == 5 || Digits == 3) {   // Adjust for five (5) digit brokers.
                pips2dbl    = Point*10; pips2points = 10;   Digits.pips = 1;
    } else {    pips2dbl    = Point;    pips2points =  1;   Digits.pips = 0; }
Also if you send them together, then for a buy TP must be higher then ask+MarketInfo( Symbol(), MODE_STOPLEVEL )*Point; SL lower than Bid-stoplevel.

Also you must refreshRates between server calls (ordersend/refresh/ordermodify)
 
puncher:

Do you know any FOREX BROKER without the BRIDGE ?

There are many... You can search here -> http://www.100forexbrokers.com/.


Can I invest on FOREX MARKET directly without the BRIDGE or FOREX BROKER ?

Not unless u r a bank or some big financial institution :)
 
gordon:

There are many... You can search here -> http://www.100forexbrokers.com/.


Not unless u r a bank or some big financial institution :)


thank you
 
WHRoeder:
Most brokers aren't using a bridge. Try IBFX.
Your problem may be not adjusting for a 5 digit broker where a pip is not a point. All TP, SL, and slippage values must be adjusted: Also if you send them together, then for a buy TP must be higher then ask+MarketInfo( Symbol(), MODE_STOPLEVEL )*Point; SL lower than Bid-stoplevel.

Also you must refreshRates between server calls (ordersend/refresh/ordermodify)


Could you please put any example for 5-decimal places after point Brokers with OrderSend() function including your above warnings?
Please put OrderSend() for BUY and SELL examples with TP and SL without ModifyOrder() after OrderSend().
The examples should be comatible with standard 4 decimal places after point Brokers and 5 too.
 
gordon:

If the broker doesn't allow it then there is no way around it. To be accurate, it's not the broker, it's the bridge they use. Specifically, AFAIK all brokers with BT bridge don't allow direct SL/TP with OrderSend().

Hi All,

I'm very aware that ALL of you here know a LOT more about all of this than I do, and its quite likely that I don't fully understand the entirety of this and the problems and ramifications of this, but I'm going to risk venturing forth on this topic anyway: Fools rush in.......

The previous broker that I used, FxPro.Com, used 5 digits on SOME of there currency pairs. An additional significant hassle was the current profit points status listed on open trades. Sometimes 25 meant 25 points/pips, other times it was 2.5!

Stating the obvious: there is the 'normalize function' which I'm sure you are all aware of, but which I know very little of as of yet as I've rarely used it to date. I utilized a rather crude but effective cluge that utilized the 'Digits' query and then made a conditional logic matrix which then converted all of the variables that I needed to either 2, 4 or 5 trailing digits based on what the 'Digits' returned.

Hardly an elegant or concise method, but didn't take much to implement and worked well and was effective. It was very easily and readily identifiable and understandable what the purpose and outcome was: a bonus for a NuB like moi.

If any of this is over any of your heads, just let me know and I'll post an example here! ROFLol (< 8)

Sorry guys, it was just to good an opportunity to miss out on! LoL (< 8)

 

4D vs 5D can be robustly/programmatically handled but it requires the user to be more cognizant of what exactly they think a stoploss in pips means exactly. All other aspects of P/L, equity at risk, margin, etc can be deftly accounted for by way of the Marketinfo as specified by the broker for each symbol().

You should really implement your codes to deal with points (MODE_POINT) and tickvalue (MODE_TICKVALUE), which will then be robust to the broker's decimal setup. The "problem" insofar as I can tell arises from the fact that people want to think of stoploss in terms of points when the tick_value is close to $10 (4D broker) versus stoploss when tick_value is closer to $1 (5D broker).

Reason: