RTRParticipant
New
Every time I try to create a strategy using custom indicators and run it, it stops after about 1 minute and is marked as a failed strategy. I’ve checked that all the variables are correctly set (in fact, I use both methods of creating the system: by writing the code and by selecting each indicator and letting it generate the code), but it still keeps stopping. I use any intraday timeframe (I have real time data) and it always fails.
For example, I take any of Ivan’s indicators (https://www.prorealcode.com/user/fbolsa/) , create the system, run it, and it always stops and the system fails.
How can I solve this issue?
Thanks. Best regards
Hi there,
If you say that any of Ivan’s Indicators fail on you, then why not put up your code calling one of them and let us try ourselves ?
That allows us to help you …
Best regards !
RTRParticipant
New
Hi there,
If you say that any of Ivan’s Indicators fail on you, then why not put up your code calling one of them and let us try ourselves ?
That allows us to help you …
Best regards !
Hi there,
For example this one (but it happens with several systems with many custom indicators)
// Definition of code parameters
DEFPARAM CumulateOrders = False // Cumulating positions deactivated
DEFPARAM Preloadbars = 2000
// Conditions to enter long positions
indicator1= CALL “PRC_SP Indicator”[60](close)
c1 = (close >= indicator1)
indicator2, ignored, ignored, ignored = CALL “PRC_Rolling POC Volume profile”[40, 15, 30, 25, 1, 1, 1](close)
c2 = (close >= indicator2)
indicator3, ignored, ignored, ignored = CALL “PRC_Purple cloud”[10, 3, 14, 0.7, 1.4, 1.4, 1, 0, 0, 1](close)
c3 = (close >= indicator3)
IF c1 AND c2 AND c3 THEN
BUY 1 SHARES AT MARKET
ENDIF
// Conditions to exit long positions
indicator12 = CALL “PRC_SP Indicator”[60](close)
c8 = (close <= indicator12)
indicator13, ignored, ignored, ignored = CALL “PRC_Rolling POC Volume profile”[40, 15, 30, 25, 1, 1, 1](close)
c9 = (close <= indicator13)
indicator14, ignored, ignored, ignored = CALL “PRC_Purple cloud”[10, 3, 14, 0.7, 1.4, 1.4, 1, 0, 0, 1](close)
c10 = (close <= indicator14)
IF c8 OR c9 OR c10 THEN
SELL AT MARKET
ENDIF
It does not give any error when building it then I go to execute it and after 1 minute it stops and the strategy fails. It also happens if I use the “CROSSES OVER” or “CROSSES UNDER” instead of “>” or “<“. It always says: “The trading system could not start because it encountered an internal error. Please send us a report to enable us to analyze the error using the “Send e-mail” button”
Thank you!
JSParticipant
Senior
Hi,
I don’t think it’s allowed to use the same “Call” multiple times in the code, for example using “CALL “PRC_SP Indicator” twice…
It’s not really necessary either — try the code below instead…
// Definition of code parameters
DEFPARAM CumulateOrders = False // Cumulating positions deactivated
DEFPARAM Preloadbars = 10000
indicator1= CALL "PRC_SP Indicator"[60](close)
indicator2, ignored, ignored, ignored = CALL "PRC_Rolling POC Volume profile"[40, 15, 30, 25, 1, 1, 1](close)
indicator3, ignored, ignored, ignored = CALL "PRC_Purple cloud"[10, 3, 14, 0.7, 1.4, 1.4, 1, 0, 0, 1](close)
// Conditions to enter long positions
c1 = (close >= indicator1)
c2 = (close >= indicator2)
c3 = (close >= indicator3)
IF c1 AND c2 AND c3 THEN
BUY 1 SHARES AT MARKET
ENDIF
// Conditions to exit long positions
c8 = (close < indicator1)
c9 = (close < indicator2)
c10 = (close <= indicator3)
IF c8 OR c9 OR c10 THEN
SELL AT MARKET
ENDIF
JSParticipant
Senior
c10 = (Close < indicator3)