only one trade per day on 3 strategies
Forums › ProRealTime English forum › ProRealTime platform support › only one trade per day on 3 strategies
- This topic has 59 replies, 6 voices, and was last updated 7 years ago by Andy11.
-
-
12/05/2016 at 11:12 AM #1781112/05/2016 at 11:15 AM #1781212/05/2016 at 1:12 PM #1781512/05/2016 at 1:22 PM #1781612/05/2016 at 3:21 PM #1781801/18/2017 at 1:13 PM #2155501/18/2017 at 5:30 PM #2160701/18/2017 at 5:37 PM #2161001/18/2017 at 7:00 PM #2161601/19/2017 at 8:48 AM #2165101/19/2017 at 9:43 AM #21657
Just add a “Moving Average” from the indicator selection window and then change its calculation mode from there (5 or 6 possible options: from SMA to Hull MA, etc..)
If you need to code a strategy with EMA, this link will lead you to an exponential moving average instruction example.
01/19/2017 at 2:00 PM #2167601/27/2017 at 1:15 PM #22740Hi
I just wanted to say thanks. The ‘do only one trade a day’ has been something I’ve really struggled to code for ages and your suggestion (using lasttradedate and opendate) worked perfectly!
Made my day!
Andy
1 user thanked author for this post.
01/27/2017 at 1:32 PM #2274401/27/2017 at 3:38 PM #22764Sure,
//I have this line at the beginning of my code after the defparams
Once LastTradeDate = 0
//Then this line after MyBuyCondition is defined
ConditionTradedToday = LastTradeDate <> OpenDate
//Then
IF MyBuyCondition AND ConditionTradedToday THEN
Buy 1 LOT AT MARKET
SET TARGET PROFIT 10
SET STOP LOSS 10
LastTradeDate = OpenDate
ENDIF
//Hope that helps, this works on a 5m chart on wall street index on IG
1 user thanked author for this post.
-
AuthorPosts
Find exclusive trading pro-tools on