Good afternoon everyone. I am trying to attach a fixed points profit to my EA in addition to the profit calculated in the risk size. Profit in risk size is working fine. But it sets some unreal value in pips. I have a listing of what will be the profit in the risk size or in points
enum enumTP //ПЕРЕЧИСЛЕНИЕ ДЛЯ ТЕЙК ПРОФИТА
{
en_fiks_tp = 1, // ФИКСИРОВАННЫЙ В ПУНКТАХ
en_v_r = 0, // В КОЛИЧЕСТВЕ Р
};
I set a variable that defines profit size in points.
externint Razmer_tp = 1500; // ТЕЙК ПРОФИТ В ПУНКТАХ
Then I write the following profit calculation and check its correctness in the on-tick.
//+--НАЧАЛО РАСЧЁТА ПРОФИТА---------------------------------------------------------------------- Разделитель ---+if(sl > 0 && Tip_tp == en_v_r) // ЕСЛИ ПРОФИТ В КОЛИЧЕСТВЕ Р//{// НАЧАЛО ПРОВЕРКИ НА НОЛЬ
tp=sl*tp_v_R; // ВЫЧИСЛЯЕМ ПРОФИТ УМНОЖАЯ СТОП ЛОС НА КОЛИЧЕСТВО РИСКА//-НАЧАЛО РАСЧЁТА ПРОФИТА В ПУНКТАХ---------------------------------------------------------------------------------------------+if(Tip_tp == en_fiks_tp)
{//--НАЧАЛО ЕСЛИ ПРОФИТ В ПУНКТАХ---------------------------------------------------------------------------------------------+
tp = Razmer_tp; // ПРОФИТУ ПРИСВАЕВАЕМ КОЛИЧЕСТВО ПУНКТ
}//---КОЕНЦ ЕСЛИ ПРОФИТ В ПУНКТАХ---------------------------------------------------------------------------------------------+
tp= NormalizeDouble(tp, Digits());// НОРМАЛИЗУЕМ ПРОФИТ, ЧТОБЫ РАБОТАЛО НА ЛЮБЫХ КАТИРОВКАХ// ПРОВЕРКА ТЕЙК ПРОФИТА НА СТОП ЛЕВЕЛ ОТ МАКАРА--if(tp<stoplevel) // ЕСЛИ ПРОФИТ МЕНЬШЕ ЧЕМ МИНИМАЛЬНО ДОПУСТИМЫЙ УРОВЕНЬ ЕГО УСТАНОВКИ ТО
{
tp=NormalizeDouble(stoplevel*1.5,Digits); // ПРОФИТУ ПРИСВАЕВАЕМ МИНИМАЛЬНО ДОПУСТИМУЮ ВЕЛИЧИНУ ЕГО УСТАНОВКИ
}
//} // КОНЕЦ ПРОВЕРКИ НА НОЛЬ //+--КОНЕЦ РАСЧЁТА ПРОФИТА---------------------------------------------------------------------- Разделитель ---+
For profit in risk size it works fine, but not for fixed profit in pips. Please advise me what I am doing wrong and what should be corrected to make my profit calculation work correctly in points?
Good afternoon everyone. I am trying to attach a fixed points profit to my EA in addition to the profit calculated in the risk size. Profit in risk size is working fine. But it sets some unreal value in pips. I have a listing of what will be the profit in the risk size or in points
I set a variable that defines profit size in points.
Then I write the following profit calculation and check its correctness in the on-tick.
For profit in risk size it works fine, but not for fixed profit in pips. Please advise what I am doing wrong and what should be corrected when calculating profit in points?
I would like to ask you to multiply the profit in pips by"Point".
Advertising a third-party resource and private channels. If it wasn't for me, I might have been banned.
What ad? A video tutorial on what's being asked.
What kind of commercial? A video tutorial on what is being asked.
what am i doing wrong?
if (in1b)what??? more, less or equal...what are you comparing "in1b" to?
Good afternoon everyone. I am trying to attach a fixed points profit to my EA in addition to the profit calculated in the risk size. Profit in risk size is working fine. But it sets some unreal value in pips. I have a listing of what will be the profit in the risk size or in points
I set a variable that defines profit size in points.
Then I write the following profit calculation and check its correctness in the on-tick.
For profit in risk size it works fine, but not for fixed profit in pips. Please advise me what I am doing wrong and what should be corrected to make my profit calculation work correctly in points?
Good afternoon everyone. I am trying to attach a fixed points profit to my EA in addition to the profit calculated in the risk size. Profit in risk size is working fine. But it sets some unreal value in pips. I have a listing of what will be the profit in the risk size or in points
I set a variable that defines profit size in points.
Then I write the following profit calculation and check its correctness in the on-tick.
For profit in risk size it works fine, but not for fixed profit in pips. Please advise what I am doing wrong and what should be corrected when calculating profit in points?
I would like to ask you to multiply the profit in pips by"Point".
What am I doing wrong?
What are you doing?
what??? more, less or equal... what are you comparing "in1b" to?
i don't have the add screenshot button you wrote about, i'll add a screenshot this way.
I wrote it down a bit but it still doesn't work)
I don't have the add screenshot button you wrote about, I'll add a screenshot this way.
I've done it a little bit but it still doesn't work)