Jump to content

Welcome to the new Traders Laboratory! Please bear with us as we finish the migration over the next few days. If you find any issues, want to leave feedback, get in touch with us, or offer suggestions please post to the Support forum here.

smurf77

Members
  • Content Count

    5
  • Joined

  • Last visited

Everything posted by smurf77

  1. Thank you!!! I appreciate your help very much. It looks like it's working! Now, I just need to figure out one hundred thousand other things :-))
  2. oh yes, sorry (bad copy and paste), in the code it's actually barssinceexit(1)>5 but it doesn't work. here is all the code: condition1 = Average(close,8) crosses over Average(close,12) ; condition2 = close > average (close,300) ; condition3 = barssinceexit(1)>5; condition4 = marketposition=0; IF condition1 and condition2 and condition3 and condition4 THEN BUY 1 share next bar AT MARKET; //SELL SIGNAL if marketposition=1 then sell next bar at(entryprice+10)limit; setstoploss(20); if currentbar - barssinceentry(0)= 22 then sell next bar at market; Any ideas? Thanks a lot!
  3. Hi, Thank you for your answer but it doesn't work. Here is the piece of code: ------------------------------------------------------------------------------------------- condition1 = Average(close,8) crosses over Average(close,12) ; condition2 = barssinceentry(1) > 5; condition3 = marketposition=0; IF condition1 and condition2 and condition3 THEN BUY 1 share next bar AT MARKET; ---------------------------------------------------------------------------------------------- What do you think? Thanks
  4. yes, I read this manual again and again and look on internet. I am actually not sure it's the right command for what I a want to do but I can not think about something else... any suggestion?
  5. Hi, For backtesting, I would like to set up a minimum number of days (5 day) between two trades: I tried that: barssinceexit(1) > 5, it didn't work... I tried a few other possibilities too. Didn't work! Thanks for your help, Smurf
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.