Indicator, Call, Backtest
Forums › ProRealTime English forum › ProOrder support › Indicator, Call, Backtest
- This topic has 41 replies, 7 voices, and was last updated 1 year ago by UKTrader.
-
-
12/08/2022 at 11:20 AM #205376
Hi,
I am stuck with this. Can someone help in this matter?
I have created an indicator with some variables which will be used as call indicator in my strategy.
I do not know how to created formula/script which will use these variables via backtest in my strategy to choose the best one.
Regards
Maciej
12/08/2022 at 12:19 PM #20538212/08/2022 at 12:32 PM #205384Hi,
The intention in strategy is ;
If Average[20](close)-Average[50](close)> 5 or 10 or 15 thenBuy at marketEndifI wish not to show this into a strategy so I was told to create an indicator and use call an indicator in a strategy.However, I do not know how to create this indicator and then give an option of backtesting strategy to find out if 5, 10 or 15 is better.12/08/2022 at 12:48 PM #205389You don’t have to use a “Call”.
When you use this code in your strategy, you can optimize the strategy…
Dizi1234567xValue = 0While xValue <> 20xValue = xValue + 5If Average[20](Close) - Average[50](Close) >= xValue thenBuy 1 contract at MarketEndIfWEnd12/08/2022 at 12:55 PM #20539112/08/2022 at 2:25 PM #205395Step 1: Create your indicator
(Name indicator = Dizi)
xAvg20 = Average[x1](close)
xAvg50 = Average[x2](close)
xDiff = xAvg20 – xAvg50
Return xDiff(Parameters: x1=20 and x2=50)
Step2: Create your strategy
(Parameter: xValue= 0 to 20 step 5)
DefParam CumulateOrders=false
MyDizi = Call “Dizi”[20.50]
If MyDizi > xValue then
Buy 1 contract at market
ElsIf MyDizi < xValue then SellShort 1 contract at market EndIf12/08/2022 at 2:30 PM #20539712/08/2022 at 2:47 PM #20540112/08/2022 at 2:51 PM #20540312/08/2022 at 3:05 PM #20540412/08/2022 at 3:14 PM #20540512/08/2022 at 3:24 PM #20541012/08/2022 at 3:32 PM #20541112/08/2022 at 3:38 PM #20541312/08/2022 at 4:05 PM #205418Thank you kindly.
I have been working on this strategy for last few months. I have added the missing part with you help.
I have been live for last few weeks and it brings +100% every month.
Please check the attached picture.
1 user thanked author for this post.
-
AuthorPosts
Find exclusive trading pro-tools on