Help converting Easylanguage to ProRealCode

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #236709 quote
    Jdh320Jdh320
    Participant
    New

    Hello

    Does anyone know where I would go to get the below easy code changed to pro real code? (TDOM is a separate function already coded)

    If month(date) = 12 then begin
    If TDOM = 15 then buy 2 contracts next bar open;
    end;

    If openpositionprofit > 0 then sell all contracts next bar open; // First Profitable Opening
    If barssinceentry = 4 then sell all contracts next bar open; // Time Decay
    SetStopLoss(400) // Cash Basedbased stop loss

     

     

    Many thanks

     

    Joe

    #236768 quote
    JSJS
    Participant
    Master

    Hi Joe,

    Try this one:

     

    DefParam CumulateOrders=False
    
    If Month=12 then
    If TDOM=15 then
    Buy 2 contract at Market
    Set Stop pLoss 400
    EndIf
    EndIf
    
    If POSITIONPERF>0 then
    Sell at Market
    EndIf
    
    If BarIndex-TradeIndex(1)=4 then
    Sell at Market
    EndIf
    
    #236799 quote
    Jdh320Jdh320
    Participant
    New

    Many thanks, I will give it a try.

    All the best.

    Joe

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

Stuck on this ProBuilder code?

Describe what this topic is trying to build, in plain English, and ProRealAI writes the ProRealTime™ indicator, screener or system for you.

Available in 7 languages
Try ProRealAI

Help converting Easylanguage to ProRealCode


General Trading: Market Analysis & Manual Trading

New Reply
Author
author-avatar
Jdh320 @jdh320 Participant
Summary

This topic contains 2 replies,
has 2 voices, and was last updated by Jdh320Jdh320
2 years ago.

Topic Details
Forum: General Trading: Market Analysis & Manual Trading
Language: English
Started: 08/25/2024
Status: Active
Attachments: No files
ProRealCode ProRealCode
Loading...