Вы упускаете торговые возможности:
- Бесплатные приложения для трейдинга
- 8 000+ сигналов для копирования
- Экономические новости для анализа финансовых рынков
Регистрация
Вход
Вы принимаете политику сайта и условия использования
Если у вас нет учетной записи, зарегистрируйтесь
OrderComment может быть переписан вашим брокером
вы хотите... Теперь, в соответствии с моим требованием, когда цена будет в прибыли, скажем, 7 пунктов [103.603], стоп лосс
1-ой и 2-ой сделок станет, скажем, 1 пункт прибыли [103.543], а Stop Loss 3-ей сделки останется на уровне 103.386.
сделать extern int BreakEven = 7
(* 10 ) коррекция у 5-значного брокера для получения значения пункта
Ооо, да, это, конечно, недостаток. Вся моя тяжелая работа с вечера теперь напрасна!
Попробовал способ различать сделки в зависимости от функции'order comment' и написал код.
В любом случае, приведенный вами код делает перемещение части Stop Loss на BE или в нужную точку, но все равно моя проблема с "третьей" сделкой не решается.
У меня также есть эта часть кода, перемещающая BE, но я застрял с неперемещающимся SL для третьей сделки.
У меня появилась другая идея, сейчас пробую.
И это было правильно?
string comment_sell="Ордер на продажу";
SellOrder=OrderSend(Symbol(), iOrderType_Sell, LotSize,OpenPrice,Slippage,dStopLossPrice,dTakeProfitPrice, comment_sell ,MagicNumber, 0,Red);
if (OrderComment()=="comment_sell") // ?
Является ли это действительным?
Допустим, я прикрепил советника к графику EURUSD.
if (Order_Symbol()==EURUSD)
Будет ли он сравнивать, является ли текущий график EURUSD или нет?
Вот способ различать заказы с помощью "магического числа".
Брекеты не сбалансированы.
Возможно ли это?
таким образом, вам придется искать 3 разных магических числа
Мне кажется, можно сделать так
Хорошо, после непрерывной напряженной работы (по крайней мере, для меня) советник стал «безошибочным»!
Коротко публикую изменения:
У меня возникла путаница с функцией Set_Magic_Number().
Я правильно его определил? Также при вызове его в других функциях, будет ли он работать правильно?
С уважением
У меня путаница с функцией Set_Magic_Number().
Правильно ли я ее определил? Также при вызове ее в других функциях, будет ли она работать правильно?
С уважением,
Я прочитал здесь, что ваш символ не "EURUSD".
Вы должны использовать правильный символ
Я прочитал здесь, что ваш символ не "EURUSD".
Вы должны использовать правильный символ.
Это не проблема. Символ брокера, на котором я тестирую советника - EURUSD,GBPUSD.....
Если я прикреплю советника к брокеру, у которого символ EURUSDpro, я просто добавлю "pro".
Вы просмотрели мой код?
Функция минимальной прибыли - это 'Failure'.
Она просто закрывает все открытые сделки при каждом исполнении, независимо от убытка/прибыли в сделках!
Но моя цель не в этом.
Я хочу, чтобы если сделка вошла в зону прибыли, а затем рынок начал разворачиваться обратно, эта функция "Минимальная прибыль" будет гарантировать, что
чтобы сделка была закрыта с желаемой минимальной прибылью.
И здесь я также не хочу, чтобы эта функция влияла на "третью" сделку.
Я пытался написать что-то подобное, но теперь это не работает.
Это не проблема. Символ брокера, на котором я тестирую советника - EURUSD,GBPUSD.....
Если я прикреплю советника к брокеру, где символ EURUSDpro, я просто добавлю 'pro'.
Вы просмотрели мой код?
Функция минимальной прибыли - это 'Failure'.
Она просто закрывает все открытые сделки при каждом исполнении, независимо от убытка/прибыли в сделках!
Но моя цель не в этом.
Я хочу, чтобы если сделка вошла в зону прибыли, а затем рынок начал разворачиваться обратно, эта функция "Минимальная прибыль" будет гарантировать, что
чтобы сделка была закрыта с желаемой минимальной прибылью.
И здесь я также не хочу, чтобы эта функция влияла на "третью" сделку.
Я пытался написать что-то подобное, но теперь это не работает.
Вы слишком усложняете ситуацию, потому что понятия не имеете, как с этим справиться.
Чем больше вы читаете и пытаетесь программировать сами, тем легче становится делать более сложные вещи.
но начинайте с простых вещей, если вы начинаете заставлять программу работать на одной сделке, то потом вы пробуете на большем количестве сделок.
вам придется многому научиться.
Если вы начнете с короткой простой программы и сделаете несколько изменений в ней для тестирования.
вы можете узнать, как работает эта программа.
Ваша проблема, с которой вы начали
Посмотрите, как бы я это сделал
не нужны разные входы для Symbol()
3 разных Magicnumbers...
Это не проблема. Символ брокера, на котором я тестирую советника - EURUSD,GBPUSD.....
Если я прикреплю советника к брокеру, где символ EURUSDpro, я просто добавлю 'pro'.
Вы просмотрели мой код?
Функция минимальной прибыли - это 'Failure'.
Она просто закрывает все открытые сделки при каждом исполнении, независимо от убытка/прибыли в сделках!
Но моя цель не в этом.
Я хочу, чтобы если сделка вошла в зону прибыли, а затем рынок начал разворачиваться обратно, эта функция "Минимальная прибыль" обеспечит, чтобы
чтобы сделка была закрыта с желаемой минимальной прибылью.
И здесь я также не хочу, чтобы эта функция влияла на "третью" сделку.
Я пытался написать что-то подобное, но теперь это не работает.
Я скомпилировал ваш код 80 ошибок 6 предупреждений
в основном необъявленный идентификатор
Мне нужен ваш код со всеми объявленными идентификаторами.
если файл слишком большой, то прикрепите
скомпилируйте файл и проверьте ошибки, которые вы получаете