Translate backtest code snippet to Mt4

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #104542 quote
    Jo han
    Participant
    New

    Hi!

    Just starting out with some coding in prt.

    I also use MT4 and would greatly appreciate if someone could

    help me how this would translate in mt4 (mql).

    I use it when i backtest trend indicators performance.

     

    DEFPARAM CumulateOrders = False
    Indicator1 = CCI[20](typicalPrice)
    ATR = AverageTrueRange[20](close)
    BuyOrder = (Indicator1 CROSSES OVER 0)
    IF BuyOrder THEN
    BUY 1 CONTRACT AT MARKET
    SL = ATR *1
    TP = ATR *2
    ENDIF
    SellOrder = (Indicator1 CROSSES UNDER 0)
    IF SellOrder THEN
    SellShort 1 CONTRACT AT MARKET
    SL = ATR *1
    TP = ATR *2
    ENDIF
    SET STOP LOSS SL
    SET TARGET PROFIT TP

    #104543 quote
    robertogozzi
    Moderator
    Master

    Sorry, but this forum only supports the ProRealTime trading platform.

    It is possible to convert code from other platforms to ProRealTime, not the other way round.

    I think you can find MT4 forums over the internet to achieve your goal.

    #104544 quote
    Vonasi
    Moderator
    Master

    ….or use the paid for ProRealCode programming service by filling in the form that can be found here:

    Trading Programming Services

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.

Translate backtest code snippet to Mt4


General Trading: Market Analysis & Manual Trading

New Reply
Author
author-avatar
Jo han @jo_han Participant
Summary

This topic contains 2 replies,
has 3 voices, and was last updated by Vonasi
6 years, 7 months ago.

Topic Details
Forum: General Trading: Market Analysis & Manual Trading
Language: English
Started: 08/10/2019
Status: Active
Attachments: No files
Logo Logo
Loading...