Help converting Easylanguage to ProRealCode

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #236709 quote
    Jdh320
    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
    JS
    Participant
    Senior

    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
    Jdh320
    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.

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 Jdh320
1 year, 5 months ago.

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