Watch how to download trading robots for free
Find us on Facebook!
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

Calculate unrealized profit(s) at a specific time in history - script for MetaTrader 5

Views:
2075
Rating:
(4)
Published:
2024.01.09 09:26
Updated:
2024.01.09 15:29
PnLAt.mq5 (4.18 KB) view
Need a robot or indicator based on this code? Order it on Freelance Go to Freelance

Once you execute you will see detailed information about trades that were open at the inputted time. 


    SymbolSyncEA SymbolSyncEA

    Syncs all chart symbols to symbol of the chart the EA is attached to

    wd.Multi_ClockPrice lite! wd.Multi_ClockPrice lite!

    The 'wd.Multi_ClockPrice lite!' is the lite version of 'wd.Multi_ClockPrice', providing a visual representation of server time and bid prices on the chart. It synchronizes with PC clock every seconds, allowing seamless updates even when MT5 is offline. Real-time bid prices are displayed, efficiently meeting the need for price information. Place informational labels in the specified sub-window, adjusting positions as needed.

    Open Trade Open Trade

    This function performs the main logic of opening a trade. Calculates the opening price, take profit levels and stop loss based on symbol information and parameters provided by the user. Prepare a trade request (MqlTradeRequest) with the necessary information, such as symbol, volume, order type, deviation, comment, magic number, etc. Call the OrderSend function to send the operation request and get the result. SetTypeFillingBySymbol function: Determines the order fill type (Fill or Kill, Immediate or Cancel, or Return) based on the symbol's filling policy. GetMinTradeLevel function: Calculates the minimum operating level based on the freeze level and the symbol stops level. Adjusts the minimum level to make sure it is within certain limits and returns the result.

    Sec-WebSocket-Key Generator Sec-WebSocket-Key Generator

    Sec-WebSocket-Key Generator