Trades being missed.

Questions about MultiCharts and user contributed studies.
Eric1704
Posts: 38
Joined: Nov 29 2022
Has thanked: 16 times

Jun 10 2024

I am testing this simple code that compiles but sometimes does not take a trade even when conditions are met. Cannot see anything wrong in script.

Code: Select all

[IntrabarOrderGeneration = false] variables: MyLo1(0), MyLo2(0); condition1 = l < l[1] ; if condition1 then begin MyLo2 = MyLo1; MyLo1 = l; end; if MyLo1 < MyLo2 then Buy ( "2LoLE" ) next bar at market ;

User avatar
faraz
Posts: 204
Joined: Feb 25 2011
Location: 1stchoicestrategy.com
Has thanked: 26 times
Been thanked: 67 times

Sep 03 2024

Code: Select all

[IntrabarOrderGeneration = false] variables: MyLo1(0), MyLo2(0); condition1 = l < l[1] ; if condition1 then begin MyLo2 = MyLo1; MyLo1 = l; end; if MyLo1 < MyLo2 then Buy ( "2LoLE" ) next bar at market ; sell next bar market; once ClearPrintLog; if MyLo1 < MyLo2 then value1=value1+1; if lastbaronchart then print(value1," ",TotalTrades);
Verified, all trades are placing properly. No issues detected.




Trading Excellence ! ! !
1stChoiceStrategy.com