Hi, i need a littlew bit help.
Dont know why, but it doesnt work. Stop Profit should be the half of the profit-30 points. Without the SL conditions it works fine, but with….. see the attached picture.
// Berechnung des aktuellen Profits long
vProfitL = high - tradeprice(1)
// Berechnung des Stop-Loss-Levels (die Hälfte des aktuellen Profits) long
StopLossLevelL = vProfitL * 0.5-30
// Berechnung des aktuellen Profits short
vProfitS = tradeprice(1)-low
// Berechnung des Stop-Loss-Levels (die Hälfte des aktuellen Profits) short
StopLossLevelS = vProfitS * 0.5-30
//// Bedingungen zum Einstieg in Long-Positionen
IF NOT LongOnMarket AND close crosses over trailingsl and close > ExponentialAverage[vAverage] THEN
BUY 1 CONTRACTS AT MARKET
ENDIF
if high-tradeprice(1) > 200 and longonmarket then
set stop profit StopLossLevelL
endif
If LongOnMarket AND close < trailingsl THEN
SELL AT MARKET
ENDIF
// Bedingungen zum Einstieg in Short-Positionen
IF not shortonmarket and close crosses under trailingsl and close < ExponentialAverage[vAverage] THEN
SELLSHORT 1 CONTRACTS AT MARKET
ENDIF
If tradeprice(1)-low > 200 and shortonmarket then
set stop profit StopLossLevelS
endif
If shortonmarket AND close > trailingsl THEN
EXITSHORT AT MARKET
ENDIF// Berechnung des aktuellen Profits long
vProfitL = high - tradeprice(1)
// Berechnung des Stop-Loss-Levels (die Hälfte des aktuellen Profits) long
StopLossLevelL = (vProfitL * 0.5)-30
// Berechnung des aktuellen Profits short
vProfitS = tradeprice(1)-low
// Berechnung des Stop-Loss-Levels (die Hälfte des aktuellen Profits) long
StopLossLevelS = (vProfitS * 0.5)-30
//// Bedingungen zum Einstieg in Long-Positionen
IF NOT LongOnMarket AND close crosses over trailingsl and close > ExponentialAverage[vAverage] THEN
BUY 1 CONTRACTS AT MARKET
ENDIF
if high-tradeprice(1) > 200 and longonmarket then
set stop profit StopLossLevelL
endif
If LongOnMarket AND close < trailingsl THEN
SELL AT MARKET
ENDIF
// Bedingungen zum Einstieg in Short-Positionen
IF not shortonmarket and close crosses under trailingsl and close < ExponentialAverage[vAverage] THEN
SELLSHORT 1 CONTRACTS AT MARKET
ENDIF
If tradeprice(1)-low > 200 and shortonmarket then
set stop profit StopLossLevelS
endif
If shortonmarket AND close > trailingsl THEN
EXITSHORT AT MARKET
ENDIF
It mus be set stop trailing, not set stop profit…. now it works
Dont know what to do, Stop Porift dont works for me….
If the trade is 200p in proft the sl should be 80p profit, but i cant find the cerrect way, please help me.
// Bedingungen zum Einstieg in Short-Positionen
IF not shortonmarket and close crosses under trailingsl and close < ExponentialAverage[vAverage] THEN
SELLSHORT 1 CONTRACTS AT MARKET
ENDIF
if tradeprice(1)-low > 100 and shortonmarket then
//sell at market
Set Stop Profit 80
endif
If shortonmarket AND close > trailingsl THEN
EXITSHORT AT MARKET
ENDIF
Please, post the full code.
Some variables are missing, please post the ITF file.
see attached the itf file, thx
Is there any chance to get help?
Is there realy noone who can help me? I only need a working example with the stop profit condition, thats all.
Or it is impossible in Version 12? Or should i pay for.
Please, i need only a little bit of help.
Try below to see if the strategy works anyway apart from the snippets including set stop Profit.
It could be there is more wrong with the Strategy and that is why it is not working as you think it should work?
//if high-tradeprice(1) > 100 and longonmarket then
//set stop Profit 80
//endif
//If tradeprice(1)-low > 100 and shortonmarket then
//set stop Profit 80
//endif
Tjx, but the strategy isnt the problem. With and without Stop Profit. There will only one Trade with the Sopt Profit condition, the others will be closed immediately.
Or try this …
if Close-tradeprice(1) > 100 and longonmarket then // Close in place of High
set stop Profit 80
endif
If tradeprice(1)-Close > 100 and shortonmarket then // Close in place of Low
set stop Profit 80
endif
Let us know how you got on.
Anybody else feel free to jump in and help killerplatuze
I get attached now with your MeinHandelssystem1.itf with the commented out lines as I suggested.
Do you get the same?