Jump to content
  • 0

Backtesting incorporating ProScreener??




I'm new to this community, so first let me introduce myself! My name is Barry (I suppose most of you already guessed that by my username!) and I'm just starting out on this exciting journey to find out "how to profit from trading".

I've done quite a bit of research, and tried setting up lots of strategies to backtest (none of them successful, so far!). I would like to proceed with my latest strategy which involves running a ProScreener script at the end of each trading day (I'm currently looking at the UK shares market), to select which shares to run in AutoTrading mode the following day. I can backtest this strategy by running the strategy for a number of days, but what I'm having a problem with is how to 'backtest' the ProScreener script. There doesn't seem to be a way to run the ProScreener script at a certain date/time (in the past)

As a work-around, I've build an indicator which "looks backwards" a certain number of periods, to show me what the indicator would have shown, had I run it at that date/time. I then reference this indicator in a ProScreener script to effectively show the list of shares that the ProScreener script would have given me, had I run it on that date/time.

Anyone still with me?.....Anyway, this seems to work, but, when I check the results of the ProScreener script, they don't match what I am expecting, when I compare manually.

I'm not sure how this forum prefers code to be included, so I am embedding it here. I'm sure someone will let me know the correct way to do this!

Strategy Code:

// looking for crossover in last 'numberPeriods' - offset by 'priorPeriods'

MACDLineVal = MACDline[12,26,9](close)
MACDSignalVal = MACDSignal[12,26,9](close)

longMACDCrossover= (MACDLineVal CROSSES OVER MACDSignalVal) and (MACDLineVal<0)
shortMACDCrossunder= (MACDLineVal CROSSES UNDER MACDSignalVal) and (MACDLineVal>0)

WHILE i < numberPeriods DO

WHILE i < numberPeriods DO

return longMACDCrossoverCount as "LONG Crossovers in Last numberPeriods",shortMACDCrossunderCount as "SHORT Crossunders in Last numberPeriods",10*longMACDCrossoverCount+shortMACDCrossunderCount as "Signal",Date[priorPeriods]-20210200 as "Date"


ProScreener Code:

ignored, ignored, indicator1, ignored = CALL "FTSEMACDLastXPeriodsOffset"[204, 24]
c1 = (indicator1 > 0)

ignored, ignored, criteria, ignored = CALL "FTSEMACDLastXPeriodsOffset"[204, 24]

SCREENER[c1] (criteria AS "Signal")


Happy to explain in more detail if anyone out there thinks they understand my problem!


Thanks for reading........

Link to comment

0 answers to this question

Recommended Posts

There have been no answers to this question yet

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • General Statistics

    • Total Topics
    • Total Posts
    • Total Members
    • Most Online
      10/06/21 10:53

    Newest Member
    Joined 27/09/23 22:00
  • Posts

    • Hi buddy, from my experience m, you sounded like you're setting a life goal for yourself in the crypto trading journey while some only treat it as a side gain where they only trade to make some profits, but seeing your eagerness, I'll say you should take it slow and do some due research.  You can try copy trading, it seems people make a lot from it following experts' trades. Please ensure you do your research and don't just take words from people you meet online. Be consistent with your savings of profits and see how you'll grow.
    • Lam Research Corp., Elliott Wave Technical Analysis Lam Research Corp., (LRCX:NASDAQ): Daily Chart, 27 September 23 LRCX Stock Market Analysis: Looking for upside into wave {v} as we seem to be near the end of the correction into wave {iv}. We could find support on the base channel before turning higher.   LRCX Elliott Wave Count: Wave (c) of {iv}. LRCX Technical Indicators: Between 20 and 200EMA.   LRCX Trading Strategy: Looking for longs into wave {v}. TradingLounge Analyst: Alessio Barretta         Lam Research Corp., LRCX: 4-hour Chart, 27 September 23 Lam Research Corp., Elliott Wave Technical Analysis LRCX Stock Market Analysis: Looking for wave (c) to end within equality and 1.618 (c) vs.(a). We can also look at the current RSI divergence we are seeing.   LRCX Elliott Wave count:  Wave v of (c). LRCX Technical Indicators: Below al averages.   LRCX Trading Strategy: Looking for longs into wave {v} after upside confirmation.
    • AUDJPY Elliott Wave Analysis Trading Lounge Day  Chart, 27 September 23 Australian Dollar / Japanese Yen(AUDJPY) Day Chart AUDJPY Elliott Wave Technical Analysis Function: Counter Trend Mode: impulsive Structure: blue wave 3 of C Position:  black wave C Direction Next lower Degrees: wave (3 of C) continue Details: blue corrective wave 2 looking completed at 96.083.now blue wave 3 started and strong move expected . Wave Cancel invalid level:96.081   The AUD/JPY Elliott Wave Analysis on 27 September 23, examines the Day Chart of the Australian Dollar/Japanese Yen (AUD/JPY) currency pair. This analysis utilizes Elliott Wave theory to provide insights into potential market trends and price movements.   The analysis identifies its Function as "Counter Trend," indicating a focus on identifying and interpreting market movements that run contrary to the prevailing trend. In this context, "counter trend" suggests an emphasis on potential reversals or corrective movements within the market.   The Mode is characterized as "impulsive," which implies an anticipation of strong and directional price movement. Specifically, the analysis expects an impulsive wave sequence within the market, suggesting the potential for significant and decisive price shifts.   The Market Structure is described as "blue wave 3 of C." This highlights the importance of the third wave within a broader C-wave structure in the Elliott Wave sequence. It signifies that the analysis is centered on the development of this specific wave.   The Position specifies that the analysis pertains to "black wave C," indicating that the entire C-wave structure is of interest in the analysis. This means that the broader context of the C-wave is taken into consideration.   The Direction Next Lower Degrees points to "wave (3 of C) continue," signifying that the analysis is focused on the continuation of the third sub-wave within the larger C-wave structure.   In the Details section, it is observed that "blue corrective wave 2" is deemed to have completed its course at the level of 96.083. The market is now in the phase of "blue wave 3," and a strong price movement is expected as part of this impulsive phase. The "Wave Cancel invalid level" is specified as 96.081, serving as a reference point for risk management and potential trade entry points.   In summary, the AUD/JPY Elliott Wave Analysis on 27 September 23, suggests that the market is currently undergoing a counter-trend phase with an anticipated impulsive price movement in the form of "blue wave 3 of C." Traders are advised to closely monitor this wave for potential trading opportunities, with the specified invalid level serving as a reference for risk management within their trading strategies.
  • Create New...