prorealtime script error

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

    Since mid-October, prorealtime proorder has stopped working at IG Securities.

    Below is one of the scripts that stopped working.

    If anyone knows the cause,
    I would appreciate it if you could tell me how to fix it.

    // Parameters
    deltaThreshold = 100 // Threshold for cumulative delta to determine trend
    shortMA = 10 // Short Moving Average period
    longMA = 50 // Long Moving Average period
    rocPeriod = 14 // Period for Rate of Change (RoC)
    
    // Variables
    delta = 0
    cumulativeDelta = 0
    
    // Calculate Cumulative Delta
    if close > open then
    delta = volume
    elsif close < open then
    delta = -volume
    else
    delta = 0
    endif
    
    cumulativeDelta = cumulativeDelta + delta
    
    // Calculate Moving Averages
    shortMAValue = average[shortMA](close)
    longMAValue = average[longMA](close)
    
    // Calculate Rate of Change (RoC) for Volatility
    rocValue = (close - close[rocPeriod]) / close[rocPeriod]
    
    // Trading Strategy with Volatility Filter
    if cumulativeDelta > deltaThreshold and shortMAValue > longMAValue and abs(rocValue) > 0.02 then
    buy 0.1 share at market
    set stop loss 20
    set target profit 40
    elsif cumulativeDelta < -deltaThreshold and shortMAValue < longMAValue and abs(rocValue) > 0.02 then
    sellshort 0.1 share at market
    set stop loss 20
    set target profit 40
    endif
    #239707 quote
    PeterSt
    Participant
    Master

    Hi,

    I recall from 6-8 weeks ago that IG was due to eliminate one of the equities like Nasdaq for some of its contract sizes ?

    Otherwise I see you buy 0.1 shares; maybe that changed to 0.5 or 1 minimum for the instrument involved ?

    What instrument(s) is this about ?

    #239919 quote
    Iván González
    Moderator
    Master

    If the problem persist,please contact PRT support.

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

prorealtime script error


ProOrder: Automated Strategies & Backtesting

New Reply
Author
author-avatar
cozcozy @cozcozy Participant
Summary

This topic contains 2 replies,
has 3 voices, and was last updated by Iván González
1 year, 3 months ago.

Topic Details
Forum: ProOrder: Automated Strategies & Backtesting
Language: English
Started: 10/29/2024
Status: Active
Attachments: No files
Logo Logo
Loading...