Gregory Kovalenko: How do you calculate which lot is required, 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.
It is easier to calculate how much of the loss will be covered by the order with lot = 1. Opens an order with lot = 1, divided by the resulting value.
A tick is new data coming from the server. And it must be processed immediately after it arrives. If you do it in loop with delay of 5 ms, then most ticks will arrive namely during this delay. Thus, processing will be delayed by 0 ... 5 ms.
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);
}