Jump to content
  • 0
Sign in to follow this  

ProRealTime Error

Question

An error is appearing in my IG platform as a result of a trading program I am running in ProRealTime.

It is NaN in the Size and Level columns of my working orders. Any ideas what it means?

Thanks

Share this post


Link to post

0 answers to this question

Recommended Posts

There have been no answers to this question yet

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.
Answer this question...

×   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,188
    • Total Members
      49,399
    Newest Member
    jb91
    Joined 21/10/19 10:30
  • Posts

    • you probably need to set your chart to display 100,000 units as well Also the code uses initial capital of 2000, not 10,000 you can change it in this line though    
    • Eventhough I've set the backtest time frame for a year, only one trade occurs on the 17th of Oct 2019
    • // 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  
×
×