Jump to content


Photo

Short after Long


  • Please log in to reply
10 replies to this topic

#1 kom75

kom75

    Advanced Member

  • Members
  • PipPipPip
  • 32 posts

Posted 08 March 2017 - 11:36 PM

Hello,

 

I have an algo where Long is opened first at given time and after its closed short can be opened at same price as Long was. I dont have a problem with first part but can't managed to have short working. Only one Long and one Short is possible.

To reset algo I set Date[0] <> Date[1], but will it be working if Long is opened at 12pm and short at 1am and again Long at 12pm?

 

Thanks for any advice how to fixed.

 

 

Attached Files



#2 tomas262

tomas262

    Advanced Member

  • Moderators
  • 2,226 posts

Posted 12 March 2017 - 11:05 PM

Hello,

 

ok, I will check your project and modify it



#3 kom75

kom75

    Advanced Member

  • Members
  • PipPipPip
  • 32 posts

Posted 12 March 2017 - 11:06 PM

Thanks Tomas

#4 tomas262

tomas262

    Advanced Member

  • Moderators
  • 2,226 posts

Posted 14 March 2017 - 08:53 PM

Hello,

 

it seems you use exit time set to 11 while earliest for the short trade is 12 o'clock so the short trade can never happen? Is this done so intentionally?



#5 kom75

kom75

    Advanced Member

  • Members
  • PipPipPip
  • 32 posts

Posted 14 March 2017 - 09:18 PM

Yes, let say ref candle is 12pm. At this time long is entered, let say price want drop to 12pm price until 1am next day where short is entered. Closing time for trades and reset is 11am and at 12 pm new cycle goes on.
I asked my question regarding reset, because trading on daily candles Date[1]<>Date[2] its obvious, but Im not do sure with this setup

#6 kom75

kom75

    Advanced Member

  • Members
  • PipPipPip
  • 32 posts

Posted 20 March 2017 - 02:20 AM

Hi Tomas, did you find answer, because I've seen you've helped others?



#7 tomas262

tomas262

    Advanced Member

  • Moderators
  • 2,226 posts

Posted 20 March 2017 - 09:31 PM

Hello,

 

sorry for not getting back to you sooner. I am still not sure about the rules of your trading. If I get it right you:

1) always enter a long position at 12pm 

2) if market continues higher you close the position at "Close time"

3) if market trades below the long position price your reverse to short

4) if market turns back up and crosses price set up at 12pm you again go long 

5) you can do another revers until "Max Trades Per Day" is reached or you reach the end of trading session - "Trade Close Time

 

Is that correct?



#8 kom75

kom75

    Advanced Member

  • Members
  • PipPipPip
  • 32 posts

Posted 20 March 2017 - 09:53 PM

Hello,

Rules are very simple

Long at 12pm
If TP reached then enter short at same price as long (short only if TP long was met)
Reset next day before 12pm

#9 kom75

kom75

    Advanced Member

  • Members
  • PipPipPip
  • 32 posts

Posted 20 March 2017 - 09:54 PM

Just have seen last question.
Only one long and one short possibel

#10 tomas262

tomas262

    Advanced Member

  • Moderators
  • 2,226 posts

Posted 21 March 2017 - 07:53 PM

Hello,

 

I have modified your project. Now it seems to be working ok

 

Let me know if any questions

 

 

Attached Files



#11 kom75

kom75

    Advanced Member

  • Members
  • PipPipPip
  • 32 posts

Posted 22 March 2017 - 12:05 AM

Thanks a lot:)






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users