I've done some research and I can't find a good way to do it, and I'm asking for help.
Use the code above to display the following values
I'll appreciate any help with that.
I'm not sure whether I understand your question correctly. My understanding is that you are concerned about open positions which already exists before you start the EA?
If so, you would need to write code in the OnInit() function that evaluates all open positions and look at the current profit/loss of each position. Then you would need to set an allowable loss for each of these orders. This "allowable loss" could then be different for these already open positions compared to positions you will open from now on in OnTick().
I need to calculate the Profit before open the position.
You didn't understand.
I need to calculate the Profit before open the position.
then perhaps you need to calculate the lot size of the position based on a fixed amount you are accepting to lose - i think you can use something like lot = (amount)/(SLdistanceInPoints*tickValue) , and then normalize the value
If you read the first post, you'll see the data I'm using to make the calculations.
YSymbol.TickValue: 0.9329402545061014
You didn't understand.
I need to calculate the Profit before open the position.
try using this equation
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
I've done some research and I can't find a good way to do it, and I'm asking for help.
Use the code above to display the following values
I'll appreciate any help with that.