PaulParticipant
Master
Good evening fifi743
Very interesting you include resistence week & daily.
It’s a concept, although different, I have been working too! It focus on the big lines (from my old strategy) and if it passes it let’s it run a bit till a small bounce.
Especially if you remove the trailing stop and use breakeven & the biglines it has good results. Then to top it off you can included a bigger trailing stop & profit target to reduce missed opportunities but that’s a small difference.
This is my developed code for profit taking.
if enablebp then
if not onmarket or ((longonmarket and shortonmarket[1]) or (longonmarket[1] and shortonmarket)) then
BLmaxprice1=0
BLminprice1=close
BLexitL=0
BLexitS=0
endif
if onmarket then
// correction on orderprice for caculating lines
if longonmarket<>longonmarket[1] or shortonmarket<>shortonmarket[1] then
focusprice=orderprice+(Factor/Divider)
endif
CurrentPrice = round(focusprice)
AboveLevel0 = CurrentPrice mod MPmod
StartLevel = CurrentPrice - AboveLevel0
Level10Up = StartLevel + (1*Factor)
Levell0Down = StartLevel - (1*Factor)
adaptlevel = (StartLevel/100)*dtl
closeLevel10Up= Level10Up - (adaptlevel/(underlaying/100))*pointsize
closeLevell0Down= Levell0Down+(adaptlevel/(underlaying/100))*pointsize
if longonmarket then
if close > closeLevel10Up then
BLexitL=1
endif
endif
if shortonmarket then
if close < closeLevell0Down then
BLexitS=1
endif
endif
BLmaxprice1=max(BLmaxprice1,low)
BLminprice1=min(BLminprice1,high)
if BLexitL then
if high < BLmaxprice1 and close[1] < open[1] and close[2] < open[2] then
sell at market
endif
endif
if BLexitS then
if low > BLminprice1 and close[1] > open[1] and close[2] > open[2] then
exitshort at market
endif
endif
endif
//graph BLexitL
//graph BLexitS
//graph BLmaxprice1
//graph BLminprice1
//graphonprice closeLevel10Up
//graphonprice closeLevell0Down
//graphonprice StartLevel coloured(121,141,35,255) as "StartLevel"
endif
// big line exit
dtl = 0.25 // % distance to line
Factor = 200 //
MPmod = 100 //
Divider= 2 //
A trailing stop often surrenders profit, 0.3-0.5% of the maximum gain so I searched for an alternative to secure profit where’s it’s likely to bounce.
good-morning Paul,
I was thinking about a cycle indicator
example
when the price is between S2 and S3 there is a great chance of being bullish and when it is between R2 and R3 to be bearish
I put on the chart the supports and resistances weekly and daily, and I observe the behavior of the price
@fifi745 – Hello there, I’m curious about your Vectorial DAX (M5)_V2 version, would you be happy with sharing the .itf here on the forum?
Hello eckaw,
yes I will share it but not right away.
I am looking to do a cycle fitre
Hello Paul,
It is not possible to test Vectorial-DAX-M5P-_test2 in real life because an error message is registered. The “Graph” statement can not be used in automatic trading.
Do you have the solution? Thank you
Just remove those lines or, even better, comment them out placing the double slashes (//) at the beginning of the line.
AEParticipant
Senior
Hello eckaw,
yes I will share it but not right away.
I am looking to do a cycle fitre
Hi fifi743!
Did you improve the cycle fitre? We are impatient to test the V2 of your strategy!
Thanks
good evening,
here is my progress.
cordially
AEParticipant
Senior
Many thanks!
It should be possible to adapt this version to other markets like Nasdaq, SP500, OIL, etc..?
Thanks again
AE – it is not necessary to quote the last post! Only use quotes to specifically highlight a section of a previous post or to show who you are specifically replying to if there have been several different posts from different forum members. I have deleted the quote from your post. 🙂
Hi Fifi, many thanks for your great job !
I want to test the strategy in real but I cannot start it as I have an error message : the “Graph” instruction cannot be used in automatic trading.
If I remove the line, it doesn’t work and if I put the double slashes // at the beginning of the line 47 as suggested by Roberto, it also doesn’t work.
Would you pls be kind to double check and I am sure you will find the solution !
Thanks for your help in advance !
buenas tardes,
aquí está mi progreso.
cordialmente
First, thanks for your great work.
How does the FILTRE_Prise_Position.itf filter affect the Bot in the actual operation? Does the filter manage the bot? Sorry if the question is absurd, but I try to learn in this complex world.
Fifi can you tell me, please, how does Filtre work?
Hello,
at line 703
I add a line
hi josef1604
in the position filter indicator there is for now what it takes.
and it is important in the bot to manage positions and stops