How to write an order function for a spread betting account using MQL4

 

Hi All,

I have been spread betting FX manually for the last 3 years.

I have decided I want to automate some of my manual systems so I decided to learn MQL4.  

 I am learning MQL4 from the MQL book on this site. I find the book excellent.

I am studying the chapter on "Opening and Placing Orders" 

Can somebody tell me how to write the "Order send" for MT4 for a spread betting account. 

Spread betting does not use lots,mini lots or micro lots. 

Placing a trade manually you input the Symbol, volume, stop loss, and take profit.

The volume is the bet per pip eg 5 euro per pip. Lots or mini lots do not form part of the placing of orders in spread betting.

All ideas will be much appreciated 

 
Bert5:

Hi All,

I have been spread betting FX manually for the last 3 years.

I have decided I want to automate some of my manual systems so I decided to learn MQL4.  

 I am learning MQL4 from the MQL book on this site. I find the book excellent.

I am studying the chapter on "Opening and Placing Orders" 

Can somebody tell me how to write the "Order send" for MT4 for a spread betting account. 

Spread betting does not use lots,mini lots or micro lots. 

Placing a trade manually you input the Symbol, volume, stop loss, and take profit.

The volume is the bet per pip eg 5 euro per pip. Lots or mini lots do not form part of the placing of orders in spread betting.

All ideas will be much appreciated 

You won't find many on here who know what Spreadbettting is let alone use it or even use it with MT4.

I have never tried spreadbetting with MT4,  how do you place a trade manually ?  you just need to do the same with the OrderSend().  What values do you have for  MarketInfo()   MODE_MAXLOT  &   MODE_MINLOT ?

 
RaptorUK:

You won't find many on here who know what Spreadbettting is let alone use it or even use it with MT4.

I have never tried spreadbetting with MT4,  how do you place a trade manually ?  you just need to do the same with the OrderSend().  What values do you have for  MarketInfo()   MODE_MAXLOT  &   MODE_MINLOT ?


Hi RaptorUK,

Thank you for your reply.

I have not automated anything yet.

What I can tell you is that manually you do not have to input anything about lots.

You input the currency pair

next line is volume   in this you put the value per pip lets say 5. 

Stop loss is say 20

take profit is 40

If your trade is successful you win 200(40 *5)

You  can place your order either as a market or a pending order 

Fxcm and FXPro are 2 who have spreadbetting on MT4 There are many more.

Up to now I have not used MT4 as my platform. 

Reason: