SUPERTREND AUTAMATIQUE
Forums › ProRealTime English forum › ProOrder support › SUPERTREND AUTAMATIQUE
- This topic has 4 replies, 2 voices, and was last updated 8 years ago by Nicolas.
-
-
03/01/2016 at 4:19 PM #3346
hi
congratulations with this site.
i trade now automatic, crosssing the supertrend.
time frame 5 min
dax 30 mini
8.00 tot 12.00
if it possible , go in trade directly 8.00 before the first signal crossing supertrend.
with condition, for long: price > supertrend
for short; price < supertrend
thank you
luc03/01/2016 at 4:22 PM #334712345678910111213141516171819202122232425262728293031323334353637383940414243// Definitie van code parametersDEFPARAM CumulateOrders = False // Opstapelen posities gedeactiveerdDEFPARAM FLATBEFORE=080000DEFPARAM FLATAFTER=120000// Condities om long posities te openenindicator1 = closeindicator2 = SuperTrend[2.8,3]c1 = (indicator1 CROSSES OVER indicator2)IF c1 THENBUY 1 LOT AT MARKET nextbaropenENDIF// Condities om long posities te sluitenindicator3 = closeindicator4 = SuperTrend[2.8,3]c2 = (indicator3 CROSSES UNDER indicator4)IF c2 THENSELL AT MARKETENDIF// Condities om short posities te openenindicator5 = closeindicator6 = SuperTrend[2.8,3]c3 = (indicator5 CROSSES UNDER indicator6)IF c3 THENSELLSHORT 1 lot at market nextbaropenENDIF// Condities om short posities te sluitenindicator7 = closeindicator8 = SuperTrend[2.8,3]c4 = (indicator7 CROSSES OVER indicator8)IF c4 THENEXITSHORT AT MARKETENDIF// Stops en targetsSET STOP $LOSS 150SET TARGET $PROFIT 70003/01/2016 at 4:27 PM #3349Hello groen200,
We already talked on Skype, let me look at your code.
What you want is just to open a new long position if the price is above the Supertrend and sell it if the price is below it? right?
Do you want also to have multiple orders in the same day or just only one?
03/01/2016 at 4:50 PM #335003/01/2016 at 5:47 PM #3358Here is the modified code groen200, hope it will be in accordance with your strategy as far as i understand it! 🙂 Supertrend groen200
123456789101112131415161718192021222324252627282930313233343536373839// Definitie van code parametersDEFPARAM CumulateOrders = False // Opstapelen posities gedeactiveerdDEFPARAM FLATBEFORE=080000DEFPARAM FLATAFTER=120000//indist = SuperTrend[2.8,3]//resetting variableonce lasttrade = 0IF LONGONMARKET thenlasttrade = 1elsif SHORTONMARKET thenlasttrade = -1elsif hour<8 OR hour>12 thenlasttrade = 0endif// Condities om long posities te openenIF close>st AND lasttrade<>1 THENEXITSHORT AT MARKETBUY 1 LOT AT MARKET nextbaropenENDIF// Condities om long posities te sluitenIF close<st AND lasttrade<>-1 THENSELL AT MARKETSELLSHORT 1 lot at market nextbaropenENDIF// Stops en targetsSET STOP $LOSS 150SET TARGET $PROFIT 700GRAPH lasttrade AS "lasttrade" -
AuthorPosts
Find exclusive trading pro-tools on