Indicator creation
Forums › ProRealTime English forum › ProBuilder support › Indicator creation
- This topic has 4 replies, 2 voices, and was last updated 5 years ago by GraHal.
-
-
08/13/2019 at 8:57 PM #104701
Hi guys
I need help to create an indicator that says when it´s time to enter a trade. Exit will be handled manually. I want the indicator to
say go LONG, when close >EMA11, EMA11 > EMA22, EMA22 > EMA35 AND MACD[12,26,4](close) < MACDline[12,26,4](close).
And go SHORT when close < EMA11, EMA11 < EMA22, EMA22 < EMA35 AND MACD[12,26,4](close) > MACDline[12,26,4](close).
Thanks in advance
Part of the strategy123456789101112131415161718192021222324252627282930313233343536373839// Conditions to enter long positionsindicator1 = ExponentialAverage[11](close)c1 = (close > indicator1)indicator2 = ExponentialAverage[11](close)indicator3 = ExponentialAverage[22](close)c2 = (indicator2 > indicator3)indicator4 = ExponentialAverage[22](close)indicator5 = ExponentialAverage[35](close)c3 = (indicator4 > indicator5)indicator6 = MACD[12,26,4](close)indicator7 = MACDline[12,26,4](close)c4 = (indicator6 < indicator7)IF c1 AND c2 AND c3 AND c4 THENBUY 1 CONTRACT AT MARKETENDIF// Conditions to enter short positionsindicator8 = ExponentialAverage[11](close)c5 = (close < indicator8)indicator9 = ExponentialAverage[11](close)indicator10 = ExponentialAverage[22](close)c6 = (indicator9 < indicator10)indicator11 = ExponentialAverage[22](close)indicator12 = ExponentialAverage[35](close)c7 = (indicator11 < indicator12)indicator13 = MACD[12,26,4](close)indicator14 = MACDline[12,26,4](close)c8 = (indicator13 > indicator14)IF c5 AND c6 AND c7 AND c8 THENSELLSHORT 1 CONTRACT AT MARKETENDIF08/13/2019 at 9:46 PM #104708I can’t recall ever doing an Indicator before, but below will give you a ‘1’ when Buy Conditions are met … see attached.
You can then set an Alert that will email you so you can then Buy manually??
123456789101112131415indicator1 = ExponentialAverage[11](close)c1 = (close > indicator1)indicator2 = ExponentialAverage[11](close)indicator3 = ExponentialAverage[22](close)c2 = (indicator2 > indicator3)indicator4 = ExponentialAverage[22](close)indicator5 = ExponentialAverage[35](close)c3 = (indicator4 > indicator5)indicator6 = MACD[12,26,4](close)indicator7 = MACDline[12,26,4](close)c4 = (indicator6 < indicator7)MyBuy = c1 AND c2 AND c3 AND c4Return MyBuy08/13/2019 at 10:16 PM #104711indicator that says when it´s time to enter a trade
Or are you wanting the Indicator to speak to you (say Go LONG)?
You can do this by recording a .wav file and using this .wav as the Alert instead of the inbuilt PRT voices / alerts.
08/15/2019 at 11:38 AM #104785Thank you GraHal. This is just what i needed.
I have one other question. Is it possible to enter a trade in real time. I mean, f.ex. when two lines are crossing, the trade should enter in exactly that moment. Not waiting for the candle to close.
If it´s possible, how do I define this in the code?
08/15/2019 at 12:40 PM #104788If you mean on the PRT Alerts … then you would tick the box – ‘Current Candle’
If you mean on Auto-System … then you would need execute trades on a Low TF – 5 secs or 15 secs maybe having had the conditions running on whatever TF you choose – 1 hour, 4 hours etc.
MTF however is not available in Live running yet, or it may be if you ask IG to switch MTF on for you!?
-
AuthorPosts
Find exclusive trading pro-tools on