- My brain is boiling. Need a cheat sheet.
- Closing orders and opening one in other direction
- Experts: 204060 Program AIGrid System
Yes! Look in the CodeBase or the Market. Search and you shall find it there.
However, you can do that with a normal stop-loss when you place your order. Simply calculate the stoploss size based on the tick value and the volume you wish to use.
Fernando Carreiro #:
Yes! Look in the CodeBase or the Market. Search and you shall find it there.
However, you can do that with a normal stop-loss when you place your order. Simply calculate the stoploss size based on the tick value and the volume you wish to use.
I was pretty specific that I want something that will close an order based on the value of the "Profit" column. I use an EA that trades numerous pairs, so I need a more broad stroke solution than calculating PIP stop losses for each pair and order. I did look in the market and got quite overwhelmed.
Risk depends on your initial stop loss, lot size, and the value of the symbol. It does not depend on margin and leverage. No SL means you have infinite risk. Never risk more than a small percentage of your trading funds, certainly less than 2% per trade, 6% total.
-
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.
-
AccountBalance * percent/100 = RISK = OrderLots * (|OrderOpenPrice - OrderStopLoss| * DeltaPerLot + CommissionPerLot) (Note OOP-OSL includes the spread, and DeltaPerLot is usually around $10/PIP but it takes account of the exchange rates of the pair vs. your account currency.)
-
Do NOT use TickValue by itself - DeltaPerLot and verify that MODE_TICKVALUE is returning a value in your deposit currency, as promised by the documentation, or whether it is returning a value in the instrument's base currency.
MODE_TICKVALUE is not reliable on non-fx instruments with many brokers - MQL4 programming forum (2017)
Is there an universal solution for Tick value? - Currency Pairs - General - MQL5 programming forum (2018)
Lot value calculation off by a factor of 100 - MQL5 programming forum (2019) -
You must normalize lots properly and check against min and max.
-
You must also check FreeMargin to avoid stop out
-
For MT5, see 'Money Fixed Risk' - MQL5 Code Base (2017)
Most pairs are worth about $10 per PIP. A $5 risk with a (very small) 5 PIP SL is $5/$10/5 or 0.1 Lots maximum.
Risk depends on your initial stop loss, lot size, and the value of the symbol. It does not depend on margin and leverage. No SL means you have infinite risk. Never risk more than a small percentage of your trading funds, certainly less than 2% per trade, 6% total.
-
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.
-
AccountBalance * percent/100 = RISK = OrderLots * (|OrderOpenPrice - OrderStopLoss| * DeltaPerLot + CommissionPerLot) (Note OOP-OSL includes the spread, and DeltaPerLot is usually around $10/PIP but it takes account of the exchange rates of the pair vs. your account currency.)
-
Do NOT use TickValue by itself - DeltaPerLot and verify that MODE_TICKVALUE is returning a value in your deposit currency, as promised by the documentation, or whether it is returning a value in the instrument's base currency.
MODE_TICKVALUE is not reliable on non-fx instruments with many brokers - MQL4 programming forum (2017)
Is there an universal solution for Tick value? - Currency Pairs - General - MQL5 programming forum (2018)
Lot value calculation off by a factor of 100 - MQL5 programming forum (2019) -
You must normalize lots properly and check against min and max.
-
You must also check FreeMargin to avoid stop out
-
For MT5, see 'Money Fixed Risk' - MQL5 Code Base (2017)
Most pairs are worth about $10 per PIP. A $5 risk with a (very small) 5 PIP SL is $5/$10/5 or 0.1 Lots maximum.
Actually, it has a lot to do with your question. How do you thing that profit or loss is calculated for an open position?
That is why I said that you can easily get the equivalent of closing a position when a certain amount of profit (or loss) in money value is reached. The same is accomplished when dealing with a batch of positions too by calculating the net position for all the open positions.
However, as I have stated before, there are several implementations of such a tool already present in the CodeBase and the Market. Have a look at each one and see which one best fits your needs.
We cannot recommend Market products, but here are two very similar examples from the CodeBase, but there are several more, so do some research:
Actually, it has a lot to do with your question. How do you thing that profit or loss is calculated for an open position?
That is why I said that you can easily get the equivalent of closing a position when a certain amount of profit (or loss) in money value is reached. The same is accomplished when dealing with a batch of positions too by calculating the net position for all the open positions.
However, as I have stated before, there are several implementations of such a tool already present in the CodeBase and the Market. Have a look at each one and see which one best fits your needs.
We cannot recommend Market products, but here are two very similar examples from the CodeBase, but there are several more, so do some research:
I would have to agree and say that you fall into the same category, but you are free to disagree with that statement.
You also stated that you could not find such tools in the CodeBase nor Market, and complained that it was "overwhelming", and so I provided examples (from a 5 second search), yet you don't seem to have tested them out.
So, given that you "already understand" and don't require further education, I will leave it up to you to resolve the issue on your own.
No, it has nothing to do with my question. I didn't ask to be educated on something I already understand. I asked if there was a tool that did a specific task and the other guy decided to espouse his wisdom instead of answer a direct question. Such is the way of the internet, everyone wants to speak but few actually listen. Thanks for the tips you provided, you were most helpful.
Never dismiss anyone who tells you what you may well already know. We can always be better at what we do, you could be the worlds leading expert on something but I always listen to other people, as they may well have a fresh perspective on how to finesse your craft better.
Never dismiss anyone who tells you what you may well already know. We can always be better at what we do, you could be the worlds leading expert on something but I always listen to other people, as they may well have a fresh perspective on how to finesse your craft better.
Ok, then here is a totally on topic and direct answer to your query, with no extras.
Yes!
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use