Watch how to download trading robots for free
Find us on Twitter!
Join our fan page
Interesting script?
So post a link to it -
let others appraise it
You liked the script? Try it in the MetaTrader 5 terminal
Scripts

HistorySelectByPosition - script for MetaTrader 5

Views:
3899
Rating:
(25)
Published:
2017.03.22 16:01
Need a robot or indicator based on this code? Order it on Freelance Go to Freelance

An example of using HistorySelectByPosition (based on the HistoryDealGetTicket use example).

Position identifier is set as the input parameter. Next, the script attempts to create a list of orders and deals with the specified identifier. 

Script operation example:

0: deal #116488443 at 2017.02.07 12:55:56 Enter, buy 0.03 EURUSD (order #132873637, position ID 132873637)
1: deal #116488540 at 2017.02.07 12:56:38 Close by, sell 0.01 EURUSD (order #132873727, position ID 132873637)
2: deal #116488549 at 2017.02.07 12:56:42 Exit, sell 0.02 EURUSD (order #132873736, position ID 132873637)


 

Translated from Russian by MetaQuotes Ltd.
Original code: https://www.mql5.com/ru/code/17572

SupportResistTrade SupportResistTrade

Support\resistance levels, trend direction — bullish\bearish.

MomentumCandleKeltner MomentumCandleKeltner

Keltner Channel built relative to the average value of the MomentumCandle oscillator as a sequence of candlesticks

OsMACandleKeltner OsMACandleKeltner

Keltner Channel built relative to the average value of the OsMACandle oscillator as a sequence of candlesticks

The Simple Trend Detector The Simple Trend Detector

A simple oscillator that uses the difference between candlestick open and close prices.