Jump to content
Sign in to follow this  

Mercury

Recommended Posts

Just seen this ported. Probably what you're after? 

 

Share this post


Link to post

Join the conversation

You are posting as a guest. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
You are posting as a guest. If you have an account, please sign in.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

  • Member Statistics

    • Total Topics
      7,633
    • Total Posts
      39,186
    • Total Members
      49,399
    Newest Member
    jb91
    Joined 21/10/19 10:30
  • Posts

    • // Definition of code parameters DEFPARAM CumulateOrders = False // Cumulating positions deactivated DEFPARAM FLATAFTER = 210000 // Prevents the system from creating new orders to enter the market or increase position size before the specified time noEntryBeforeTime = 080000 timeEnterBefore = time >= noEntryBeforeTime // Prevents the system from placing new orders to enter the market or increase position size after the specified time noEntryAfterTime = 160000 timeEnterAfter = time < noEntryAfterTime // Prevents the system from placing new orders on specified days of the week daysForbiddenEntry = OpenDayOfWeek = 6 OR OpenDayOfWeek = 0 size = (2000/400) + ROUND(STRATEGYPROFIT / 800) // Levels 0% and 100% if OpendayofWeek <> 1 then L0 = DLow(1) L100 = DHigh(1) elsif OpendayofWeek = 1 then L0 = DLow(2) L100 = DHigh(2) Endif GRAPHONPRICE L0 GRAPHONPRICE L0 + -23 COLOURED (200,0,0) GRAPHONPRICE L100 GRAPHONPRICE L100 - 7 COLOURED (200,0,0) // Conditions to enter long positions c1 = high crosses over L0 + -23 //c12 = close > L25-5 IF c1 AND timeEnterBefore AND timeEnterAfter AND not daysForbiddenEntry THEN BUY size PERPOINT AT MARKET SET TARGET PPROFIT 84 //SET STOP PLOSS SL ENDIF // Conditions to enter shortpositions c3 = low crosses under L100 - 7 //c32 = close < L75+5 IF c3 AND timeEnterBefore AND timeEnterAfter AND not daysForbiddenEntry THEN SELLSHORT size PERPOINT AT MARKET SET TARGET PPROFIT 70 //SET STOP PLOSS SL ENDIF  
    • Yeah, only tested on a 5min chart so far. It does about 177 trades in 1 year and a quarter, so less than 1 trade per day on average
×
×