Download MetaTrader 5
To add comments, please log in or register
Join MQL5 Cloud Network. Millions of traders are waiting for this!
sectioni
18
sectioni 2016.03.30 12:15 

Hi,

 

I'm an Etoro user trying to switch to mql (i'm a senior programmer).

 

On Etoto, say i wanted to invest 500$ on EURUSD at x10 risk, i would open the buy window, input 500, select x10 risk and that's it.

 

How would i do the same thing with the OrderSend method? i don't see a parameter for inputting risk or a USD amount i want to invest in the currency. 

 

Thanks. 

whroeder1
13627
whroeder1 2016.03.30 13:14  

sectioni:

On Etoto, say i wanted to invest 500$ on EURUSD at x10 risk, i would open the buy window, input 500, select x10 risk and that's it.

How would i do the same thing with the OrderSend method? i don't see a parameter for inputting risk or a USD amount i want to invest in the currency.

  1. There is no such buy window. Only openprice, SL, TP, Lots, Buy/Sell/Pending. If you want that, it must be coded such as 'Money Manager Graphic Tool' indicator by 'takycard'
  2. There is no such risk parameter, only openprice, SL, TP, Lots, Buy/Sell/Pending
    • You place the stop where it needs to be - where the reason for the trade is no longer valid. E.g. trading a support bounce the stop goes below the support.
    • Account Balance * percent = RISK = |OrderOpenPrice - OrderStopLoss| * OrderLots * DeltaPerlot (Note OOP-OSL includes the SPREAD)
    • Do NOT use TickValue by itself - DeltaPerlot
    • You must normalize lots properly and check against min and max.
    • You must also check FreeMargin to avoid stop out

sectioni
18
sectioni 2016.03.30 13:33  

Thanks,

 

So far i managed to figure out that what Etoro is calling "Risk" is actually "Leverage" in forex.

So the question now is how do i set leverage i want to use per order? 

/
To add comments, please log in or register