Reply

Simple RSI algo

11 replies

kom75

Subscriber, bbp_participant, community, 32 replies.

Visit profile

7 years ago #116434

Hi,

 

I wan t to make simple algo where if position1 is opened I can open position2 and position3 IF rules allow it. For some reason position1 is closed at the open of next candle even if closing rule wasnt met. What did I wrong?

 

2nd question is how I can make monetary stop in this algo? Idea behind is risking same amount of money regardless of opened positions. If I risk 100 pips with first position, when I open 2nd one I want to risk same amount in monetary terms

 

Thanks for any help

File: RSI.sqw

0

tomas262

Administrator, sq-ultimate, 2 replies.

Visit profile

7 years ago #141927

Hello,

 

in your Exit condition you use “OR” which makes condition valid anytime RSI (2) is higher than 50. Try to replace it with “AND” and it should help

0

kom75

Subscriber, bbp_participant, community, 32 replies.

Visit profile

7 years ago #141932

Its exactly what I want. If I change to AND position will be closed if both condition will be met

0

kom75

Subscriber, bbp_participant, community, 32 replies.

Visit profile

7 years ago #141933

I should add that sometimes position is closed after 1-2 sec, definitely not because of RSI. Something wrong in the code and I cant find what

0

tomas262

Administrator, sq-ultimate, 2 replies.

Visit profile

7 years ago #141941

Hello,

 

it works for me as expected. Two trades worked normally while the third was closed “immediatelly” because of RSI exit condition

 

To use monetary stop you can use “Open P/L” function to monitor open loss and decide about exit

 

0

kom75

Subscriber, bbp_participant, community, 32 replies.

Visit profile

7 years ago #141942

Hello Tomas,

 

 

I checked again and now didnt closed first position but didnt opened 2nd and 3rd either. Never had such a problem with professional algos. I see its working on your platform, can be something wrong within mine?

 

to risk no more then $100 Open P/L should be =< 100?

 

Thanks

0

kom75

Subscriber, bbp_participant, community, 32 replies.

Visit profile

7 years ago #141944

last question Tomas. Is it possible algo this algo close manual trades too? Algo opened first position and because it didnt opened 2nd and 3rd I did it manualy with fixed tp. Algo have closed all 3 positions together according to rules (rsi>50), but below fixed tp for manual trades

 

thanks for your reply

0

tomas262

Administrator, sq-ultimate, 2 replies.

Visit profile

7 years ago #141987

Hello,

 

do you get any error when testing? Look at the Journal

 

You should use IF Open P/L < -100 for losing trade detection

 

Manual trades have magic number 0 so you can manage them all as one group

0

kom75

Subscriber, bbp_participant, community, 32 replies.

Visit profile

7 years ago #142008

Hello,

Weird thing, in backtest everything is ok, but trading on demo or live it opening one trade only. I have money on acc, no number of opened positions restriction. Really dont understand

0

kom75

Subscriber, bbp_participant, community, 32 replies.

Visit profile

7 years ago #142011

Below 2 printscreens with actual positions

0

tomas262

Administrator, sq-ultimate, 2 replies.

Visit profile

7 years ago #142031

Have you looked into the terminal for possible error? What about lot size? Do you have correct value set for demo/live?

0

kom75

Subscriber, bbp_participant, community, 32 replies.

Visit profile

7 years ago #142033

Yes, I’ve checked all and everything seems to be correct. im bit lost because algo works in very erratic way. Same day I posted AUDUSD and EURUSD printscreen, GBPUSD was working fine having 3 positions opened. Anyway thanks Tomas for looking at the algo and I will still try to find a solution

0

Viewing 11 replies - 1 through 11 (of 11 total)