I decided to test all trailing stops and noticed that the simplest one does not work quite correctly, pushing the stops back. I thought it was easy to do it myself. I tried it and it turned out like this:
Is it possible to directly extract (from the characteristics of the order) the margin for the open order in the currency of the deposit (the value of the invested funds for the open position in the currency of the deposit)? Let's say the deposit is in Rubles, and yesterday I opened a position with X lots of USDJPY. I may calculate the margin for this position as "Margin = (Contract/Leverage)*USDRUR [at the opening]", but it would not be exact (the exact USDRUR rate at the opening is not always available, especially if the position is old). What to do?
Dear programmers, does anyone have a script that opens positions when the price reaches the horizontal line set by the user? Or tell me how to recognise the horizontal line on the chart.
I don't know how to set the Price variable to the current price (
Current price is stored in the Ask and Bid variables
If you compare the current price with indicator values, you have to take the Bid, as all indicators and oscillators are only calculated on demand prices.
But for some reason it does not want to work. Can you tell me what's wrong?
Are Tral_Stop and TrailingStop equal to each other?
Are Tral_Stop and TrailingStop equal to each other?
Oops, yes, sorry, unfortunate rookie mistake, two identical variables. Doesn't want to work with one as well.
I really need help!
How to write a trading criterion for crossing the price with an expotential average in MQL4.
Suppose I set EMA20_Open variable through iMA. I don't know how to set the Price variable to be the current price (!)
Please help me!
I don't know how to set the Price variable to the current price (
Current price is stored in the Ask and Bid variables
If you compare the current price with indicator values, you have to take the Bid, as all indicators and oscillators are only calculated on demand prices.
I really need help!
How to write a trading criterion for crossing the price with an expotential average in MQL4.
Suppose I set EMA20_Open variable through iMA. But I don't know how to set the Price variable to be the current price ( I don't know ).
>> Help!
I can try to do it this way:
Exactly the crossing can be done this way:
ToReshetov, and
Novice
- special kudos!!!
Thank you very much.