
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Hello. How do I get the current profit/loss on the current open order?
Trying
- Returns only positive, profit, if position is in deficit at the moment, loss is not shown.
P.S. In order historyOrderProfit() shows minus as well.
regarding the current profit on the order (did not find the initiator of the post)
regarding the current profit on the order (did not find the initiator of the post)
Thank you, there was indeed an error in the logic of the code, that's why
did not work.
Now an interesting question has arisen.
I look at the last order in the history, I see a loss. I would like to decrease tp and increase lot. tp
How do I calculate which lot is required, knowing the current price to open and the new tp - to close the loss?
Thanks, there was indeed an error in the logic of the code.
did not work.
Now this is an interesting question.
I look at the last order in the history and see a loss. I would like to decrease tp and increase lot. tp - how to calculate which lot is needed.
How do I calculate what lot is needed, knowing the current price to open and the new tp - to close the loss?
Calculates how much of the loss will be covered by an order with a lot equal to OrderLots(). Opens an order with a lot equal to OrderLots(), divided by the obtained value.
In other words, if the OrderLots() closes 0.5 losses, you open an order with the lot OrderLots()/0.5 = OrderLots()*2.
If OrderLots() closes the loss twice, use OrderLots() / 2
Calculates how much of the loss will be covered by an order with a lot equal to OrderLots(). Opens an order with a lot equal to OrderLots(), divided by the obtained value.
I have a quadruple question.
everyone has a limit of 3000 pips in the chart settings, or does anyone have any vertical scaling working at all ?
here's a screenshot
Application of "looping programmes"
Please explain the pros and cons. Is it better than waiting for a new tick from start()? Does it increase response speed to a new tick?
start()
{
while(!IsStopped())
{
RefreshRates();
//...
Sleep(5);
}
return;
}
Application of "looping programmes"
Please explain the pros and cons. Is it better than waiting for a new tick from start()? Does it increase response speed to a new tick?
start()
{
while(!IsStopped())
{
RefreshRates();
//...
Sleep(5);
}
return;
}
while(!IsStopped())
{
RefreshRates();
//...
Sleep(5);
}