Advertisement
Maurizio-Ciullo

Indicatore Lowest Low Session

Apr 4th, 2024
577
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // Attenzione Preso Dal Forum Qta Da Macrco Baruzzi, Da Testare Realmente
  2. // Facendo Anche Un PLot !!!.
  3.  
  4. inputs:
  5.     SL(125);
  6.    
  7. var:
  8.     lowestLow(0), // Lowest low during London session
  9.     buyLimitPrice(0); // Price for buy limit order
  10.  
  11. // Calculate the lowest low during the London session
  12. if (Time >= 700 and Time < 1500) then
  13.     lowestLow = Lowest(low, (1500 - 700 + 100)/100);
  14.  
  15. // Wait for the New York session to start
  16. if (Time >= 1200) then
  17.     buyLimitPrice = lowestLow; // Set buy limit price
  18.  
  19. // Place a buy limit order
  20. if (Time >= 1200 and Time < 2000) then
  21.     Buy("BuyLimit") next bar at buyLimitPrice limit;
  22.  
  23. // Close the trade at the end of the New York session
  24. if (Time >= 2000) then
  25.     Sell("CloseTrade") next bar at market;
  26.  
  27. setstoploss_pt(SL);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement