Bonjour à tous, je suis VRAIMENT catastrophique en coding, je suis un littéraire j’ai horreur des logiques mathematiques, malgré tout je me force à comprendre comment coder un algo que je trouve interessant… J’apprecierai enormement un coup de pouce pour m’aider à finaliser un code :
Voici mon probleme, j’utilise BladeScalper pour entrer en position, j’ai l’impression qu’il rentre au bon moment, mais ne se stoppe jamais au TP1 et pire il poursuit la position sans se stopper au SL.
J’utilise ce code :
ignored, BladeSignal = CALL "BladeSCALPER"[1, 1, 1, 1, 0.7, 25, 0.7, 0, 0.7, 15000, 1, 3.6, 29.6, 0, 1, 0, 200, 0, 0](close)
//of course you need to adapt each parameter of the PatternFactor and the MovingAverageFILTER (23.6, ... , ..., 0, 200, 0)
if not longonmarket and BladeSignal =1 then
buy 0.4 contract at market
endif
if not shortonmarket and BladeSignal =-1 then
sellshort 0.4 contract at market
endif
Oui je sais c’est basique mais j’ai fait des efforts j’ai essayé manuellement :
// Définition des paramètres du code
DEFPARAM CumulateOrders = False // Cumul des positions désactivé
// Conditions pour ouvrir une position acheteuse
ignored, indicator1 = CALL "BladeSCALPER"[1, 1, 1, 1, 0.7, 25, 3.2, 0, 3.2, 15000, 1, 3.6, 31.6, 1, 1, 0, 200, 0, 1](close)
c1 = (close CROSSES UNDER indicator1)
IF c1 THEN
BUY 0.45 CONTRACT AT MARKET
ENDIF
// Conditions pour fermer une position acheteuse
ignored, indicator2 = CALL "BladeSCALPER"[1, 1, 1, 1, 0.7, 25, 0.7, 0, 0.7, 15000, 1, 3.6, 31.6, 1, 1, 0, 200, 0, 1](close)
c2 = (close CROSSES UNDER indicator2)
IF c2 THEN
SELL AT MARKET
ENDIF
Bref rien n’y fait, mais je suis sur que la communauté pourra m’aider à coder correctement….
Désolé pour le charabia…