Trading Equity Curve
Forums › ProRealTime English forum › ProOrder support › Trading Equity Curve
- This topic has 8 replies, 4 voices, and was last updated 8 years ago by Nicolas.
-
-
11/17/2016 at 5:44 AM #16691
I would like too put a moving average on my equity curve and only initiate trades if the equity curve is above the moving average. I’ve tried the coding posted in another article on this forum but didn’t have much luck with it, can anyone help please?
11/17/2016 at 7:24 AM #1669311/17/2016 at 9:46 AM #16698Please update your country flag in your profile, thank you 🙂
Do this code work for you?
12myequity = (((close-positionprice)*pointvalue)*countofposition)/pipsize + strategyprofitavg = average[20](myequity)It should calculate a moving average of 20 periods of the current opened orders gain plus the already made profit (strategyprofit).
11/18/2016 at 9:16 PM #16788Thanks Nicolas, i’ll give it a go!
11/18/2016 at 10:59 PM #16791I think you will need to make your own equity curve, if you want to include simulated trades that occur while the equity curve is below the moving average.
You do this by initiating some trades as fake, and some as both fake and real. For fake trades, you calculate the profit or loss based on your sell/stop conditions. You do this in an indicator for example, and then call it in a moving average function, allowing you to make real trades based on the value.
11/19/2016 at 6:23 AM #16795Thanks Wing! That’s sort of what is was thinking of …is it possible too simulate trades in an indicator though?
11/19/2016 at 6:12 PM #16810Yes, you can, or in a trading system. You simply add a variable for when you are initiating and holding a fake trade, size of that position, initial price etc., then when reaching sell conditions, you “sell” the fake position and look at the new close compared to what you bought the fake positon at, and add this win/loss to a equity variable you create.
11/20/2016 at 5:22 AM #16818Thanks Wing! Good idea, I will give it a go.
11/20/2016 at 11:17 AM #16826For your information, recently someone ask PRT about my blog article for this purpose (trading the equity curve), and why it doesn’t work with IG accounts. He got answers and another way to implement it with this account type: IG account equity curve trading code
Hope it will help you.
-
AuthorPosts
Find exclusive trading pro-tools on