//Definition of code parameters
DEFPARAM CumulateOrders = False //Cumulating positions deactivated
//The system will cancel all pending orders and close all positions at 000. No new ones will be allowed until after the FLATBEFORE time.
DEFPARAM FLATBEFORE = 090000
//Cancel all pending orders and close all positions at the FLATAFTER time
DEFPARAM FLATAFTER = 173000
// Conditions to enter long positions
indicator1 = Average[10](Stochastic[36,10](totalPrice))
indicator2 = Stochastic[36,10](totalPrice)
c1 = (indicator1 CROSSES UNDER indicator2)
IF c1 THEN
BUY 1 SHARES AT MARKET
ENDIF
// Conditions to enter short positions
indicator3 = Average[10](Stochastic[36,10](totalPrice))
indicator4 = Stochastic[36,10](totalPrice)
c2 = (indicator3 CROSSES OVER indicator4)
IF c2 THEN
SELLSHORT 1 SHARES AT MARKET
ENDIF
// Stops and targets
SET STOP pLOSS 30 pTRAILING 18
Hi Everyone,
i’d like to convert this code to easyLanguage but I don’t have any knowledge with easyLanguage . Anyone can help, please !
Free conversions are only done for code written in other languages to PRT.
The other way round is available as paid service at https://www.prorealcode.com/trading-programming-services/.
ok, I’m sorry. It’s just for a school project
ZigoParticipant
Master
Defparam cumulateorders =false
defparam flatbefore = 090000
defparam flatafter = 173000
//parameters
a1=Stochastic[36,10](totalprice)
a2 = Average[10](Stochastic[36,10](totalPrice))
// Conditions to enter long positions
if a1 crosses over a2 then
buy 1 share at market
ENDIF
// Conditions to enter short positions
IF a1 crosses under a2 THEN
SELLSHORT 1 SHARES AT MARKET
ENDIF
// Stops and targets
SET STOP pLOSS 30 pTRAILING 18
ZigoParticipant
Master
I don’t know which timeframe you had in mind?
@Zigo Are you sure this is the EasyLanguage version?
Moreover, line 23 is not accepted by PRT, only one type of SL at a time. For trailing stops it’s recommended to use code snippets rather than built-in instrucions.
ZigoParticipant
Master
Wat I have done, see attachement
@Zigo I think you are off topic 🙂
elabed was asking for easylanguage code conversion, which we don’t supply. By the way, you seem to have fun by playing with the code he provided! !lol!
Thank you all for your reply.
@Nicolas yes i know that you don’t supply conversions for free but will be grateful if anyone can help me.
No one will provide code for easylanguage on this forum. I close the topic.