Coding help:
As the topic said, how to write codes that will:
exit a position (long or short) if current bar closes with profit? (any profit)
and also how to:
exit a position (long or short) after 5 bars.
Many thanks!
This may get you started (0.0001 equates to 0.01%) …
If Positionperf = – 0.0001 or Positionperf = 0.001 THEN
Sell at market
Exitshort at Market
Endif
If Barindex – Tradeindex = 5 Then
Sell at market
Exitshort at Market
Endif
Useful for you to check the instructions above on the ‘Function menu’ on the PRT Platform then you understand them better also you can check my syntax is correct! ha
Cheers
Graham
PS Can you tell me why my posts are always double spaced?? 🙂
Aha I can see already! I use a lot of short sentences and hit return a lot!!!! lol
I need to remember to shift+return instead! It’s great asking questions cos it makes me look for answers!